1457 Fibonacci again


Submit solution

Points: 100
Time limit: 1.0s
Memory limit: 32M

Problem types
Allowed languages
C, C++, Java, Python

Description

A Fibonacci sequence is calculated by adding the previous two members in the sequence,with the first two members being both 1.Namely,f(1)=1,f(2)=1,f(n>3)=f(n-1)+f(n-2).

Your task is to take a number n as input,and print the result of that Fibonacci mod five.

Input

Each line will contain an integer n(n<=10^9).Process to end of file.

Output

For each case,output the result in a line.

Sample

Input

1
5

Output

1
0

Comments

There are no comments at the moment.