
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

# import sys

# sys.setrecursionlimit(10 ** 6)

# import bisect

# from collections import deque



def cmb(n, r):

    """組み合わせ"""

    import math

    if n < r:

        return 0

    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))





# from decorator import stop_watch

#

#

# @stop_watch

def solve(S):

    mod = 10 ** 9 + 7

    ans = 0

    for i in range(1, S // 3 + 1):

        tama = i + (S - (i * 3))

        tama -= 2

        bo = i - 1

        ans += cmb(tama + 1, bo)

        ans %= mod

    print(ans)





if __name__ == '__main__':

    # S = input()

    S = int(eval(input()))

    # N, M = map(int, input().split())

    # Ai = [int(i) for i in input().split()]

    # Bi = [int(i) for i in input().split()]

    # ABi = [[int(i) for i in input().split()] for _ in range(N)]

    solve(S)



    # # test

    # from random import randint

    # from func import random_str

    # solve()


# optimized version of the same code:

# 解説を参考に作成

# import sys

# sys.setrecursionlimit(10 ** 6)

# import bisect

# from collections import deque

# from decorator import stop_watch

#

#

# @stop_watch

def solve(S):

    mod = 10 ** 9 + 7

    dp = [0] * (S + 1)

    dp[0] = 1

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

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

        dp[i] %= mod

    print((dp[S]))





if __name__ == '__main__':

    S = int(eval(input()))

    solve(S)



    # # test

    # from random import randint

    # from func import random_str

    # solve()

# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
def cmb(n, r):
    """組み合わせ"""
    import math

    if n < r:
        return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


# from decorator import stop_watch
#
#
# @stop_watch
def solve(S):
    mod = 10**9 + 7
    ans = 0
    for i in range(1, S // 3 + 1):
        tama = i + (S - (i * 3))
        tama -= 2
        bo = i - 1
        ans += cmb(tama + 1, bo)
        ans %= mod
    print(ans)


if __name__ == "__main__":
    # S = input()
    S = int(eval(input()))
    # N, M = map(int, input().split())
    # Ai = [int(i) for i in input().split()]
    # Bi = [int(i) for i in input().split()]
    # ABi = [[int(i) for i in input().split()] for _ in range(N)]
    solve(S)
    # # test
    # from random import randint
    # from func import random_str
    # solve()

# 解説を参考に作成
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
#
#
# @stop_watch
def solve(S):
    mod = 10**9 + 7
    dp = [0] * (S + 1)
    dp[0] = 1
    for i in range(3, S + 1):
        dp[i] = dp[i - 1] + dp[i - 3]
        dp[i] %= mod
    print((dp[S]))


if __name__ == "__main__":
    S = int(eval(input()))
    solve(S)
    # # test
    # from random import randint
    # from func import random_str
    # solve()

+# 解説を参考に作成 -def cmb(n, r): -    """組み合わせ""" -    import math - -    if n < r: -        return 0 -    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) - - -    ans = 0 -    for i in range(1, S // 3 + 1): -        tama = i + (S - (i * 3)) -        tama -= 2 -        bo = i - 1 -        ans += cmb(tama + 1, bo) -        ans %= mod -    print(ans) +    dp = [0] * (S + 1) +    dp[0] = 1 +    for i in range(3, S + 1): +        dp[i] = dp[i - 1] + dp[i - 3] +        dp[i] %= mod +    print((dp[S])) -    # S = input() -    # N, M = map(int, input().split()) -    # Ai = [int(i) for i in input().split()] -    # Bi = [int(i) for i in input().split()] -    # ABi = [[int(i) for i in input().split()] for _ in range(N)]