def main():

  n = int(eval(input()))

  

  dp = [0]*(n+1)

  dp[0] = 1

  mod = pow(10, 9) + 7

  for i in range(n+1):

    for j in range(i-2):

      dp[i] += dp[j]

      dp[i] %= mod

  

  print((dp[n]))



if __name__ == "__main__":

  main()
def main():

  n = int(eval(input()))

  

  dp = [0]*(n+1)

  dp[0] = 1

  mod = pow(10, 9) + 7

  for i in range(3, n+1):

    dp[i] = dp[i-1] + dp[i-3]

    dp[i] %= mod

  

  print((dp[n]))



if __name__ == "__main__":

  main()
def main():
    n = int(eval(input()))
    dp = [0] * (n + 1)
    dp[0] = 1
    mod = pow(10, 9) + 7
    for i in range(n + 1):
        for j in range(i - 2):
            dp[i] += dp[j]
            dp[i] %= mod
    print((dp[n]))


if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    dp = [0] * (n + 1)
    dp[0] = 1
    mod = pow(10, 9) + 7
    for i in range(3, n + 1):
        dp[i] = dp[i - 1] + dp[i - 3]
        dp[i] %= mod
    print((dp[n]))


if __name__ == "__main__":
    main()

-    for i in range(n + 1): -        for j in range(i - 2): -            dp[i] += dp[j] -            dp[i] %= mod +    for i in range(3, n + 1): +        dp[i] = dp[i - 1] + dp[i - 3] +        dp[i] %= mod