# 2021-2022 ICPC, SEERC, 1/8 Final

# Integer division by 5

There are n stones on the table. For 1 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 5?

Please note that 0 is divisible by any number, which means that if there are 0 stones left on the table, then the condition of the problem is satified.

## Input data

One integer n (0 \le n \le 10^9) — initial number of stones on the table.

## Output data

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 5.

## Examples

0

0

1

1

3

2

## Note

In the first example, initially there are 0 stones on the table. 0 is divisible by 5, 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 0 stones on the table, and 0 is divided by 5.

In the third example, you can pay one coin and put another stone on the table (thus, there will be 4 stones on the table), and then pay another coin and put another stone on the table, thus getting 5 stones, which is divided by 5.