A - Bichrome Cells Editorial /

Time Limit: 2 sec / Memory Limit: 256 MB

配点: 100

問題文

N \times N のマス目があります。

このマス目の各マスを白色または黒色に塗ることにしました (すべてのマスをどちらか片方の色に塗ります)。

ちょうど A マスを白色に塗るとき、黒色に塗ることになるマスはいくつあるでしょうか。

制約

  • 1≦N≦100
  • 0 ≦ A ≦ N^2

入力

入力は以下の形式で標準入力から与えられる。

N
A

出力

黒色に塗ることになるマスの個数を出力せよ。


入力例 1

3
4

出力例 1

5

3 \times 3 のマス目にはマスが 9 個あります。 そのうち 4 個を白く塗るので、残った 5 マスは黒く塗ることになります。


入力例 2

19
100

出力例 2

261

入力例 3

10
0

出力例 3

100

白く塗るマスの個数が 0 なので、すべてのマスが黒く塗られます。

Score : 100 points

Problem Statement

We have an N \times N square grid.

We will paint each square in the grid either black or white.

If we paint exactly A squares white, how many squares will be painted black?

Constraints

  • 1 \leq N \leq 100
  • 0 \leq A \leq N^2

Inputs

Input is given from Standard Input in the following format:

N
A

Outputs

Print the number of squares that will be painted black.


Sample Input 1

3
4

Sample Output 1

5

There are nine squares in a 3 \times 3 square grid. Four of them will be painted white, so the remaining five squares will be painted black.


Sample Input 2

19
100

Sample Output 2

261

Sample Input 3

10
0

Sample Output 3

100

As zero squares will be painted white, all the squares will be painted black.