open Num

let () =
  let rec read x ls =
    if x = 0 then ls
    else
      let t = read_line () in
      read (x-1) (num_of_string t :: ls) in
  let rec gcd x y =
    if y =/ (num_of_int 0) then x
    else gcd y (mod_num x y) in
  let lcm x y =
    let d = gcd x y in quo_num (x */ y) d in
  let n = read_int () in
  let ls = read n [] in
  List.fold_left lcm (num_of_int 1) ls |> string_of_num |> print_endline
