require"prime"
n=gets.to_i
if n==1
  puts 0
  exit
end

def l_eq(ary1,ary2)
  ary1.size.times{|i|
    return false if ary1[i]>ary2[i]
  }
  true
end

primes=Prime.each(n).to_a
prime_count=Hash.new(0)
2.upto(n){|k|
  k.prime_division.each{|p,a|
    prime_count[p]+=a}
}

ans=0
h={}
[[74],[2,24],[4,14],[2,4,4]].each{|factor_nums|
  k=factor_nums.size
  primes.permutation(k){|ps|
    ns=ps.map{|p|prime_count[p]}
    if l_eq(factor_nums,ns)
      key=ps.zip(factor_nums).sort_by(&:first)
      unless h[key]
        ans+=1
        h[key]=true
      end
    end
  }
}
puts ans