MODC = 1000000007
s = gets.strip.to_i
# fact initialize
$factm = [1,1,2]
3.upto(s) do |i|
  $factm[i] = $factm[i-1] * i % MODC
end

def combm(n,k)
  t = $factm[k] * $factm[n-k] % MODC
  $factm[n] * t.pow(MODC-2, MODC) # =n!/t
end

ans = 0
1.upto(s/3) do |l|
  ans += combm(s-2*l-1, l-1)
  ans %= MODC
end
p ans