let _ = 
  let factorial n =
    let rec iter n rst = if n = 1 then rst else iter (n - 1) (Int64.mul rst (Int64.of_int n)) in
    iter n 1L in
  Printf.printf "%Ld\n" (Scanf.scanf "%d\n" (fun x -> factorial x))