There are stones on the table. For coin, you can do one of the following operations:
Pick up one stone from the table. textbf You cannot perform this operation if there are no stones on the table.
Place another stone on the table.
What is the smallest number of coins you need to spend so that the number of stones on the table is divisible by ?
Please note that is divisible by any number, which means that if there are stones left on the table, then the condition of the problem is satified.
One integer () — initial number of stones on the table.
Print a single integer - the minimum number of coins that you need to spend so that the number of stones on the table is divisible by .
In the first example, initially there are stones on the table. is divisible by , so no coins need to be spent.
In the second example, you can pay one coin and take one stone from the table. Then there will be stones on the table, and is divided by .
In the third example, you can pay one coin and put another stone on the table (thus, there will be stones on the table), and then pay another coin and put another stone on the table, thus getting stones, which is divided by .