let rec f c acc n = if n = 1 then acc else if n mod c = 0 then begin if (n / c) mod c = 0 then f c acc (n / c / c) else f c (acc * c) (n / c) end else f (c + 1) acc n let x = read_int () let () = print_int (f 2 1 x); print_newline ()