https://www.acmicpc.net/problem/11727
n = int(input()) dptable = [0]*1001 dptable[1] = 1 dptable[2] = 3 for i in range(1, n+1): if dptable[i] != 0: continue dptable[i] = (dptable[i-1] + dptable[i-2]*2)%10007 print(dptable[n])