let s = Int(readLine()!)!

var dp: [Int] = .init(repeating: -1, count: s + 1)
let mod = 1000000007
func backtrack(from value: Int, target: Int) -> Int {
  if value == target {
    return 1
  }
  if value > target {
    return 0
  }
  if dp[value] != -1 {
    return dp[value]
  }
  
  var sum = 0
  for i in 3..<2001 {
    if i + value > target {
      break
    }
    sum += backtrack(from: value + i, target: target)
    sum %= mod
  }
  dp[value] = sum
  return dp[value]
}

print(backtrack(from: 0, target: s))