mod = 1000000007 def main(): import sys input = sys.stdin.readline N = int(input()) dp = [0] * (N + 1) dp[0] = 1 for i in range(3, N + 1): for j in range(N + 1): if j + i <= N: dp[i + j] = (dp[i + j] + dp[j])%mod print(dp[-1]) if __name__ == '__main__': main()