By Hiago Oliveira de Jesus, UEA Brazil
Five little ducks went for a walk. Beyond the mountains. To play. Their mom cried: 'Quack, quack, quack, quack'. But only four little ducks came back from there. Four little ducks went for a walk. Beyond the mountains. To play. Their mom cried: 'Quack, quack, quack, quack'. But only three little ducks came back from there. Three little ducks went for a walk. Beyond the mountains. To play. Their mom cried: 'Quack, quack, quack, quack'. But only two little ducks came back from there. Two little ducks went for a walk. Beyond the mountains. To play. Their mom cried: 'Quack, quack, quack, quack'. But only one little duck came back from there. One little duck went for a walk. Beyond the mountains. To play. Its mom cried: 'Quack, quack, quack, quack'. But no little ducks came back from there.
The mother duck was so sad that day decided to ask your help to look beyond the mountains, at the seashore, how many ducklings did not return from there.
There will be several test cases, the first line of each test case contains an integer (0 ≤ P ≤ 1019) representing the total amount of ducks, the input ends with P = -1.
The output file should contain the amount of little ducks returned there.
Input Sample | Output Sample |
0 1 10000000000000000000 -1 |
0 0 9999999999999999999 |