Masala #TSI4ZANQJU
New Year
New Year is approaching, but Santa isn't ready. He has only made \(k\) gifts, but there are \(n\) kids in the white list. He has asked Shohjahon to make \(m\) more gifts, so that the total number gifts can be equally divided among \(n\) kids. However, Shohjahon is not good at maths, so he asks you for help. As there is not much time left, print the minimum possible value of \(m\).
Input consists of 2 lines.
First line contains number \(n\) (1 ≤ \(n\) ≤ \(10^9\)).
Second line contains number \(k\) (1 ≤ \(k\) ≤ \(10^9\)).
Print the answer to the problem - minimum possible value of \(m\).
It is guaranteed that answer always exists.
| # | input.txt | output.txt |
|---|---|---|
| 1 |
3 5 |
1 |
| 2 |
1 67 |
0 |
In the first case we can see that there were 5 gifts initially, we can add 1 more gift and total number of gifts becomes 5 +1 = 6. We can equally divide 6 gifts among 3 children (6 / 3 = 2).