A - Robot Balance Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 100

問題文

高橋くんは、頭パーツを 1 個と体パーツを 1 個組み合わせてロボットを 1 体作ることができます。 ロボットは頭パーツの重さが体パーツの重さより大きいと倒れてしまいます。

現在、高橋くんは頭パーツと体パーツを 1 個ずつ持っています。 高橋くんが持っている頭パーツの重さは H グラム、体パーツの重さは B グラムです。

高橋くんは、体パーツを重くすることで、ロボットを倒れないようにしたいです。 高橋くんが作るロボットが倒れないようにするためには、体パーツをあと何グラム重くする必要があるか求めてください。

制約

  • 1\le H\le100
  • 1\le B\le100
  • 入力はすべて整数

入力

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

H B

出力

答えを出力せよ。


入力例 1

43 1

出力例 1

42

高橋くんは、体パーツを 42 グラム重くすることで、頭パーツと体パーツの重さを等しくすることができます。

体パーツを重くする量が 42 グラム未満のとき、高橋くんが作るロボットは倒れてしまうため、42 を出力してください。


入力例 2

4 31

出力例 2

0

高橋くんがこのままロボットを作ってもロボットは倒れないため、0 を出力してください。


入力例 3

1 1

出力例 3

0

Score : 100 points

Problem Statement

Takahashi can combine a head part and a body part to create a robot. A robot falls over if the weight of the head part is greater than the weight of the body part.

Currently, he has one head part and one body part. The weight of the head part is H grams, and the weight of the body part is B grams.

He wants to make the body part heavier so that the robot does not fall over. Find how many more grams the body part needs to be made heavier so that his robot does not fall over.

Constraints

  • 1\le H\le100
  • 1\le B\le100
  • All input values are integers.

Input

The input is given from Standard Input in the following format:

H B

Output

Print the answer.


Sample Input 1

43 1

Sample Output 1

42

By making the body part 42 grams heavier, Takahashi can make the weights of the head part and body part equal.

When the amount by which the body part is made heavier is less than 42 grams, his robot will fall over, so print 42.


Sample Input 2

4 31

Sample Output 2

0

Even if he creates the robot as is, the robot will not fall over, so print 0.


Sample Input 3

1 1

Sample Output 3

0