#K41897. Modified Fibonacci XOR Sequence
Modified Fibonacci XOR Sequence
Modified Fibonacci XOR Sequence
Given a positive integer n, compute the nth term of a modified Fibonacci sequence defined as follows: the first two terms are 1 and 1, and for n \ge 3, the term is obtained by computing the bitwise XOR of the previous two terms.
Mathematically, the recurrence can be written in LaTeX as: $$f(1)=1,\quad f(2)=1,\quad f(n)=f(n-1)\oplus f(n-2) \text{ for } n\ge3.$$
inputFormat
The input consists of a single integer n (with n \(\ge\) 1). Input is read from standard input.
outputFormat
Output the nth term of the modified Fibonacci sequence to standard output.
## sample1
1