class Integer
  def combination(k)
    return 1 if k.zero?

    (self - k + 1..self).inject(:*) / k.factorial
  end

  def factorial
    return 1 if self.zero?

    (1..self).inject(:*)
  end
end

s = gets.to_i
sum = 0
(1..s/3).each do |e|
  sum += (e+(s-e*3)-1).combination(s-e*3)
  sum = sum % 1000000007
end

p sum