Apple Division - 3

Problem Statement

n students divide k apples as evenly as possible so that the difference is no more than 1. How many students get fewer apples?

Input

Two integers: n and k.

Output

Print how many students got fewer apples than others.

Example

[{'input': '7\n30', 'output': '5'}, {'input': '7\n28', 'output': '0'}]