n = gets.to_s.to_i ans = 0_i64 0.upto(n//5) do |i| 0.upto(i) do |j| cnt = n - i * 5 - j * 2 if cnt >= 0 && cnt % 3 == 0 ans += 1 end end end pp ans