s = gets.chomp.to_i
m = 10**9 + 7
arr = []
3.upto(s){ |i|
  arr[i-3] = i
 }
result = []
ans = 0
for i in 1..s
  arr.combination(i).each{ |j|  
    x = 0
	for k in 0..(i-1)
    	x += j[k]
    end
          p x
    if(x == s)
    	ans += 1
    end
	}
end
puts ans%m
