import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines # 最後の パ ごとに N = int(read()) MOD = 10 ** 9 + 7 dp = [0] * (N+10) dp[:3] = 1,1,2 for n in range(3,N+10): dp[n] = (dp[n-2] + dp[n-3]) % MOD print(dp[N])