import sys
n = int(sys.stdin.readline().rstrip())
d = [0] * (n + 1)
d[1] = 1
if n > 1:
    d[2] = 2
if n > 2:
    for x in range(3, n + 1):
        d[x] = d[x - 2] + d[x - 1]
print(d[n] % 10007)

ea0e8dcf3bdf73cce6a6c9b268010df8073f5b40
<mask token>

<mask token>
if n > 1:
    d[2] = 2
if n > 2:
    for x in range(3, n + 1):
        d[x] = d[x - 2] + d[x - 1]
print(d[n] % 10007)

<mask token>
n = int(sys.stdin.readline().rstrip())
d = [0] * (n + 1)
d[1] = 1
if n > 1:
    d[2] = 2
if n > 2:
    for x in range(3, n + 1):
        d[x] = d[x - 2] + d[x - 1]
print(d[n] % 10007)

import sys
n = int(sys.stdin.readline().rstrip())
d = [0] * (n + 1)
d[1] = 1
if n > 1:
    d[2] = 2
if n > 2:
    for x in range(3, n + 1):
        d[x] = d[x - 2] + d[x - 1]
print(d[n] % 10007)
