require "prime"
n = gets.chomp.to_i

prime_factors = n.times.inject({}) do |res, i|
  res.merge(Prime.prime_division(i + 1).to_h) do |key, v0, v1|
    v0 + v1
  end
end 

ge_4 = prime_factors.select {|_k, v| v >= 4}.size
ge_2 = prime_factors.select {|_k, v| v >= 2}.size

if ge_4 < 2
  puts 0
else
  puts ge_4 * (ge_4 - 1) / 2 * (ge_2 - 2)
end
