open System let ri () = stdin.ReadLine() |> int let ria () = stdin.ReadLine().Split() |> Array.map int type Sol() = member this.Solve() = let N = ri() let mutable ( L : list ) = [] for i in [1..N] do L <- ( ri () ) :: L let rec gcd a b = if a = 0 then b else gcd (b%a) a let g = List.reduce gcd L L |> List.map (fun x -> x/g ) |> List.sum |> printfn "%d" let mySol = new Sol() mySol.Solve()