https://www.acmicpc.net/problem/11726
# Bottom-up import sys n = int(sys.stdin.readline().rstrip()) d = [0] * 1001 d[1] = 1 d[2] = 2 for i in range(3, n+1): d[i] = d[i-1] + d[i-2] print(d[n] % 10007)