class Integer
  def nCr(k, m = MOD)
    u = d = 1
    n = self
    (1..k).each{|i|
      u = u * n % m
      d = d * i % m
      n -= 1
    }
    u * d.pow(m - 2, m) % m
  end

  def nHr(r, m = MOD)
    (self + r - 1).nCr(r, m)
  end
end

MOD = 10**9+7
S = gets.to_i

max = S / 3
ans = 0
(1..max).each{|i|
  rest = S - i * 3
  i.nHr(rest)
  ans += i.nHr(rest)
}
p ans % MOD