Crosses and Crosses
시간 제한: 1000ms메모리 제한: 128MB출처: NEERC Northern Subregional 2007BOJ 3596
문제
The game of Crosses and Crosses is played on the field of 1 × n cells. Two players make moves in turn. Each move the player selects any free cell on the field and puts a cross ‘×’ to it. If after the player’s move there are three crosses in a row, he wins. You are given n.
Find out who wins if both players play optimally
입력
Input file contains one integer number n (3 ≤ n ≤ 2000).
출력
Output ‘1’ if the first player wins, or ‘2’ if the second player does.
예제
예제 1
입력
3
출력
1
예제 2
입력
6
출력
2
코드를 제출하려면 로그인하세요.