S = gets.strip.to_i

@m = Array.new(S*S,-1)
M = (10 **9 + 7)

def solve(s, l)
  if l < 3
    return 0
  end
  if s == l
    return 1
  end
  ss = s - l
  if ss < 3
    return 0
  end
  if ss < 6
    return 1
  end
  hash = (s*l)-1
  if @m[hash] > 0
    return @m[hash]
  end
  k = 0
  i = 3
  while i <= ss
    k = (k + solve(ss, i)) % M
    i += 1
  end
  @m[hash] = k
  return k
end

a = 0
i = 3
while i <= S
  aa = solve(S,i)
  a += aa
  i += 1
end

puts (a % M)
