#P3908. XOR Summation
XOR Summation
XOR Summation
Given a positive integer \(N\), compute the value of \(1 \bigoplus 2 \bigoplus \cdots \bigoplus N\), where \(\bigoplus\) denotes the bitwise XOR operation.
The bitwise XOR operation between two numbers \(A\) and \(B\) is defined as the bit-by-bit exclusive OR of their binary representations.
inputFormat
The input consists of a single integer \(N\) (\(1 \leq N \leq 10^{12}\)).
outputFormat
Output the result of \(1 \bigoplus 2 \bigoplus \cdots \bigoplus N\).
sample
1
1