#P3908. 数列之异或

数列之异或

Description

Find the value of 12N1 \oplus 2 \oplus\cdots\oplus N.

ABA \oplus B denotes the bitwise XOR of A,BA,B.

Input Format

One line with an integer NN.

Output Format

One integer, the answer.

3
0

Hint

  • For 50% of the testdata, 1N1061 \le N \le 10^6.
  • For 100% of the testdata, 1N10181 \le N \le 10^{18}.

Translated by ChatGPT 5