Even or Odd?
题号:NC224873
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 512 M,其他语言1024 M
64bit IO Format: %lld

题目描述

Your friend has secretly picked n consecutive positive integers between 1 and 1018 and wants you to guess if their sum is even or odd.

If the sum must be even, write 2. If the sum must be odd, write 1. If the sum could be even or could be odd, write 0.

输入描述:

The single line of input contains a single integer n (1 ≤ n ≤ 109).

输出描述:

Output 2 if the sum of any n consecutive integers in the range from 1 to 1018 must be even, 1 if the sum must be odd, or 0 if the sum could be either even or odd.
示例1

输入

复制
3

输出

复制
0
示例2

输入

复制
6

输出

复制
1
示例3

输入

复制
12

输出

复制
2