import sys

input = sys.stdin.readline

mod = pow(10, 9)+7

memo = dict()

def dfs(n):

    if n in memo:

        return memo[n]

    if n < 3:

        return 0

    ans = 0

    for i in range(n-3, 2, -1):

        ans += dfs(i)+1

        ans %= mod

    memo[n] = ans%mod

    return ans



def main():

    n = int(eval(input()))

    ans = dfs(n)

    if n >= 3:

        ans += 1

    print(ans)







    

if __name__ == "__main__":

    main()



memo = dict()



def dp(n):

  if n == 0: return 1

  if n in memo: return memo[n]

  ans = 0

  mod = pow(10, 9) + 7

  for i in range(n-2):

    ans = (ans + dp(i)) % mod

  memo[n] = ans

  return ans



s = int(eval(input()))

ans = dp(s)

print(ans)
import sys

input = sys.stdin.readline
mod = pow(10, 9) + 7
memo = dict()


def dfs(n):
    if n in memo:
        return memo[n]
    if n < 3:
        return 0
    ans = 0
    for i in range(n - 3, 2, -1):
        ans += dfs(i) + 1
        ans %= mod
    memo[n] = ans % mod
    return ans


def main():
    n = int(eval(input()))
    ans = dfs(n)
    if n >= 3:
        ans += 1
    print(ans)


if __name__ == "__main__":
    main()

memo = dict()


def dp(n):
    if n == 0:
        return 1
    if n in memo:
        return memo[n]
    ans = 0
    mod = pow(10, 9) + 7
    for i in range(n - 2):
        ans = (ans + dp(i)) % mod
    memo[n] = ans
    return ans


s = int(eval(input()))
ans = dp(s)
print(ans)

-import sys - -input = sys.stdin.readline -mod = pow(10, 9) + 7 -def dfs(n): +def dp(n): +    if n == 0: +        return 1 -    if n < 3: -        return 0 -    for i in range(n - 3, 2, -1): -        ans += dfs(i) + 1 -        ans %= mod -    memo[n] = ans % mod +    mod = pow(10, 9) + 7 +    for i in range(n - 2): +        ans = (ans + dp(i)) % mod +    memo[n] = ans -def main(): -    n = int(eval(input())) -    ans = dfs(n) -    if n >= 3: -        ans += 1 -    print(ans) - - -if __name__ == "__main__": -    main() +s = int(eval(input())) +ans = dp(s) +print(ans)