#1 ~ 1000 까지 숫자 generation 해보기
for index in range(1,1001):
print(index)
#빈 리스트 만들기
dp = [0] * 1001
dp[0] #0
dp[1]
dp[2]
for index in range(3, 1001):
dp[index] = dp[index-1] + dp[index-2]
print(dp[2] % 10007)
print(dp[9] % 10007)
#제출
n = int(input())
dp = [0] * 1001
dp[1] = 1
dp[2] =2
for index in range(3, 1001):
dp[index] = dp[index-1] + dp[index-2]
print(dp[n] % 10007)