1N = int(input())
2dp = [[1]+[0]*9 for _ in range(N+1)]
3
4for i in range(1, N+1):
5 for j in range(1, 10):
6 dp[i][j] = dp[i-1][j]+dp[i][j-1]
7
8print (sum(dp[N])%10007)
1N = int(input())
2dp = [[1]+[0]*9 for _ in range(N+1)]
3
4for i in range(1, N+1):
5 for j in range(1, 10):
6 dp[i][j] = dp[i-1][j]+dp[i][j-1]
7
8print (sum(dp[N])%10007)