cho.sh
Notes
Loading...

Raising the Win Rate

Time limit

2s

Memory limit

128 MB

Problem

A player has played X games and won Y of them.

The displayed win rate Z is computed as floor(100 * Y / X). In other words, the fractional part is discarded.

From now on, the player will win every additional game. Because the record is cumulative, each future game increases both the total number of games and the number of wins by 1.

Given X and Y, find the minimum number of additional games needed for the displayed integer win rate to increase.

Input

A single line contains two integers X and Y.

Output

Print the minimum number of additional games needed for the displayed win rate to increase. If it can never increase, print -1.

Constraints

  • 1 <= X <= 1,000,000,000
  • 0 <= Y <= X