Under construction

Still being built. Things may change

Even or Odd?

Interview

Time limit1sMemory limit512 MB

Summary
Given n, decide whether the sum of any n consecutive positive integers is always even, always odd, or depends on the starting point.
Level

Easy2 of 10

Topics
Math, Implementation, Number theory
Solved
No attempts yet

Problem

Your friend has secretly picked n consecutive positive integers between 1 and 10^18 and wants you to guess whether their sum is even or odd.

Write 2 if the sum must be even. Write 1 if the sum must be odd. Write 0 if the sum could be even or could be odd.

Input

The single line of input contains a single integer n (1 ≤ n ≤ 10^9).

Output

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

Examples3

  1. Example 1

    Input
    3
    
    Expected output
    0
    
  2. Example 2

    Input
    6
    
    Expected output
    1
    
  3. Example 3

    Input
    12
    
    Expected output
    2