n = gets.to_i ans = 0.upto(n / 5).sum do |i| 0.upto(i).sum do |j| 0.upto(n / 3).count { |k| 5 * i + 2 * j + 3 * k == n } end end puts ans