MOD = 1_000_000_007
s = gets.to_i

dp = Array.new(s + 1) { Array.new(s + 1, 0) }
dp[0][0] = 1

s.times do |i|
  tmp = 0
  3.upto(s) do |m|
    tmp = (tmp + dp[i][m - 3]) % MOD
    dp[i+1][m] = tmp
  end
end

sum = 0
s.times do |i|
  sum = (sum + dp[i][s]) % MOD
end

p sum
