"They are already preparing for the banquet and distributing the refreshments," the Gryphon whispered back. "Right after the trial, there will be a banquet in the Great Dining Hall, and the jurors will enter the hall one by one, each carrying a cup of tea and a dish of pretzels. The only issue is that the dinner gong can sound at any moment, even before all the jurors have entered the hall. When the gong sounds, all jurors who have already entered must immediately start their tea, dividing all the pretzels equally among themselves. If they can't divide them equally, the Queen will be furious and order the immediate execution of all the jurors, as happened a few years ago."
"How will they decide how many pretzels each should carry to avoid the Queen's wrath?" Alice asked.
"They are jurors, so they are quite dull, but they will manage this problem easily," the Gryphon replied. "Moreover, they get the pretzels themselves, so each juror carries the smallest possible number of pretzels, possibly even an empty dish."
"How interesting!" exclaimed Alice, sneaking up to the first juror to peek at what he had written on his slate. "Look, the first juror will carry exactly pretzels into the hall," she turned to the Gryphon, "now I know exactly how many jurors will carry exactly pretzels on their dish!"
The input consists of a single line containing three natural numbers , , and — the number of jurors (because solving the problem only when n = 12 wouldn't be as interesting, right?). All numbers do not exceed 10^9.
Output the number of jurors who will carry exactly pretzels into the hall.
Note: The title of the problem is preserved for bibliographic accuracy. However, it should be noted that the author, unlike the Knave of Hearts who was accused, did not commit, incite, or in any other way mention robbery, theft, or the commission of other crimes against pretzels.
Example 1