Vedansh has a friend Noel.they always used to roam together . but Noel always used to stuck Vedansh . One day Noel Challenged Vedansh to solve the Mystery Question , but since Vedansh is poor in mathematics , help him to find the solution .
INPUT :
first line of input contains a number N .
OUTPUT:
Find the Mystery and output correct answer in new line.
CONSTRAINTS :
1<=N<=10^50
Hints :
Input : 1
Output : 1
Input : 2
Output : 3
Input : 3
Output : 0
Input : 4
Output : 4
Input : 8
Output : 8
There is Mystery in Question . go for mathematical logics (Gates);