let rec seq a b = if a > b then [] else a :: seq (a+1) b
let (>>=) xs f = List.map f xs |> List.concat

let factorize n =
  let rec aux c d x =
    if x = 1 then if c > 0 then [(d, c)] else []
    else if x mod d = 0 then aux (c+1) d (x/d)
    else if c > 0 then (d, c) :: aux 0 (d+1) x else aux 0 (d+1) x
  in aux 0 2 n

let sum = List.fold_left (+) 0
let () =
  Scanf.scanf "%d" @@ fun n ->
  let a = Array.make 100 0 in
  seq 1 n |> List.iter (fun i ->
    factorize i |> List.iter (fun (d, c) -> a.(d) <- a.(d) + c));
  let v0 = sum (seq 0 99 >>= fun i -> if a.(i) >= 75-1 then [1] else []) in
  let v1 = sum begin
    (seq 0 99 >>= fun i ->
     seq 0 99 >>= fun j ->
       if i = j then []
       else [
         (if a.(i) >= 14 && a.(j) >= 4 then 1 else 0) +
         (if a.(i) >= 24 && a.(j) >= 2 then 1 else 0)
       ])
  end in
  let v2 = List.length begin
    (seq 0 99     >>= fun i ->
     seq 0 99     >>= fun j ->
     seq (j+1) 99 >>= fun k ->
       if i <> j && i <> k && a.(i) >= 3-1 && a.(j) >= 5-1 && a.(k) >= 5-1
       then [1] else [])
  end in
  Printf.printf "%d\n" (v0 + v1 + v2)
