Var i, a, b, t, d, n : integer;
x : array of integer;
begin
read(n);
SetLength(x, n + 1);
for i := 1 to n do
read(x[i]);
a := x[1];
for i := 2 to n do begin
b := x[i];
d := a * b;
while (b > 0) do begin
t := a;
a := b;
b := t mod b;
end;
a := d div a;
end;
writeln(a);
end.