시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 128 MB29913710546.875%

문제

Red John has a chess table of infinite dimensions, and n * n pawns, arranged in an n x n square. The pawns can be moved horizontally or vertically, buy jumping over an (horizontally or vertically) adjacent pawn, and onto the next position, only if this position is unoccupied by another pawn. Also, when a valid move occurs, the jumped pawn is removed. Can you help Red John figure out if there is a sequence of moves which leaves only one pawn on the table ?

Below, such a sequence of moves is illustrated, for n = 2. Pawns are depicted by the letter P.

입력

The program input is from a text file. Each file contains a value for n, with 0 < n < 109.

출력

The output consists of 1 if there is a sequence of moves leaving only one pawn on the table, and 0 otherwise. There cannot be any whitespace and newline characters in the output. Two examples of input/output pairs are shown below.

예제 입력 1

4

예제 출력 1

1

예제 입력 2

3

예제 출력 2

0