Fair Distribution

emoncse Intra Sylhet Polytechnic...
Limits 1s, 512 MB

Mr. Forhad has XX children. One day, on his way home, he bought YY chocolates for his children. He doesn't know if he can divide these YY chocolates equally among his XX children. If he can’t, then he must buy some more chocolates so that he can divide the chocolates equally among his children.

Now, you need to write a program to help Mr. Forhad determine the minimum number of additional chocolates that he needs to buy so that he can make the distribution fair.

Input

Each line will have two integers XX and YY (0<X,Y1500 < X, Y \le 150) where XX is the number of children that Mr. Forhad has and YY is the number of chocolates that Mr. Forhad has already bought.

Output

You must print one integer which is the minimum number of additional chocolates that Mr. Forhad needs to buy.

Sample

InputOutput
3 10
2

Submit

Login to submit.

Statistics

97% Solution Ratio
Nasif_44thEarliest, Apr '19
Nasif_44thFastest, 0.0s
SIR.24Lightest, 0 B
jafrilalamshihabShortest, 24B
Toph uses cookies. By continuing you agree to our Cookie Policy.