s = int(eval(input()))

lst = [0,0,1]

num = 10**9 + 7

if s>= 4:

  for i in range(4,s+1):

    ans = (lst[i-2] + lst[i-4])%num

    lst.append(ans)

  print((lst[-1]%num))

if s == 3:

  print((1))

if (s == 1) or (s == 2):

  print((0))
s = int(eval(input()))

lst = [0,0,1]

num = 10**9 + 7

if s>= 4:

  for i in range(4,s+1):

    ans = (lst[i-2] + lst[i-4])%num

    lst.append(ans)

  print((lst[-1]%num))

elif s == 3:

  print((1))

else:

  print((0))
s = int(eval(input()))
lst = [0, 0, 1]
num = 10**9 + 7
if s >= 4:
    for i in range(4, s + 1):
        ans = (lst[i - 2] + lst[i - 4]) % num
        lst.append(ans)
    print((lst[-1] % num))
if s == 3:
    print((1))
if (s == 1) or (s == 2):
    print((0))

s = int(eval(input()))
lst = [0, 0, 1]
num = 10**9 + 7
if s >= 4:
    for i in range(4, s + 1):
        ans = (lst[i - 2] + lst[i - 4]) % num
        lst.append(ans)
    print((lst[-1] % num))
elif s == 3:
    print((1))
else:
    print((0))

-if s == 3: +elif s == 3: -if (s == 1) or (s == 2): +else: