using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]C - Multiple Clocks
            int n = int.Parse(Console.ReadLine());
            var t = ReadLines(n);

            long lcm = t[0];
            var math = new MyMath();

            for (int i = 1; i < n; i++)
            {
                long newLcm = GetLcm(lcm, t[i]);

                if (newLcm == 0)
                {
                    lcm = math.GetLcmByFactoring(lcm, t[i]);
                }
                else
                {
                    lcm = newLcm;
                }
            }

            Console.WriteLine(lcm);
        }

        static long GetLcm(long a, long b)
        {
            if (a >= b)
            {
                if (a % b == 0)
                {
                    return a;
                }
            }
            else
            {
                if (b % a == 0)
                {
                    return b;
                }
            }

            return 0;
        }

        static List<long> ReadLines(long count = 0)
        {
            //[summary]コンソールの値を読み込む
            var lines = new List<long>();
            string s;

            //読み込む行数が未指定のときは、1行目の値を"count"とみなす
            if (count == 0)
            {
                s = Console.ReadLine().TrimEnd();
                count = long.Parse(s);
            }

            for (long i = 0; i < count; i++)
            {
                s = Console.ReadLine().TrimEnd();
                lines.Add(long.Parse(s));
            }

            return lines;
        }
    }

    class MyMath
    {
        public long GetGcd(long a, long b)
        {
            //[summary]a,b2つの数の最大公約数を求める
            //以下リンクを参考に実装
            //https://qiita.com/gushwell/items/e9614b4ac2bea3fc6486

            if (a < b)
            {
                //引数を入れ替えて自分を呼び出す
                return GetGcd(b, a);
            }
            else
            {
                while (b > 0)
                {
                    long remainder = a % b;

                    a = b;
                    b = remainder;
                }

                return a;
            }
        }

        public long GetLcm(long a, long b)
        {
            //[summary]a,b2つの数の最小公倍数を求める
            //Lcm: least Common Multiple
            //以下リンクを参考に実装
            //https://qiita.com/gushwell/items/f08d0e71fa0480dbb396

            long gcd = GetGcd(a, b);
            return a * b / gcd;
        }

        public long GetLcmByFactoring(long a, long b)
        {
            long gcd = GetGcd(a, b);
            long upper = (long)Math.Pow(10, 9);

            if (a <= upper && b <= upper)
            {
                return a * b / gcd;
            }
            else
            {
                var factoring = new Factoring(a);
                var factorsA = factoring.GetFactors();

                factoring = new Factoring(b);
                var factorsB = factoring.GetFactors();

                factorsA.AddRange(factorsB);

                factoring = new Factoring(gcd);
                var factorsGcd = factoring.GetFactors();

                foreach (var factor in factorsGcd)
                {
                    factorsA.Remove(factor);
                }

                long lcm = 1;

                foreach (var factor in factorsA)
                {
                    lcm *= factor;
                }

                return lcm;
            }
        }
    }

    class Factoring
    {
        private List<long> factors = new List<long>();

        public Factoring(long num)
        {
            //[summary]ある数を素因数分解する

            if (num < 2)
            {
                //2より小さい数を受け取った場合
                factors.Add(num);
            }
            else
            {
                //平方根以下の素数で総当りで割って行く
                //以下リンクを参考に実装
                //https://qiita.com/gushwell/items/561afde2e00bf3380c98

                //平方根を求める
                long sqrt = (long)Math.Sqrt(num);

                //2,3,5で割る(割れなくなるまで割り続ける)
                num = DevideWith(num, 2);
                num = DevideWith(num, 3);
                num = DevideWith(num, 5);

                var primes = new List<int> { 7, 11, 13, 17, 19, 23, 29, 31 };
                long i = 0;

                //平方根以下の素数(候補)で総当りで割る
                while (num > 1)
                {
                    foreach (var p in primes)
                    {
                        if (p + i > sqrt)
                        {
                            factors.Add(num);
                            return;
                        }
                        else
                        {
                            num = DevideWith(num, p + i);
                        }
                    }

                    i += 30;
                }
            }
        }

        private long DevideWith(long num, long d)
        {
            while (num % d == 0)
            {
                factors.Add(d);
                num /= d;
            }

            return num;
        }

        public List<long> GetFactors()
        {
            //[summary]素因数分解した結果を取得

            return factors;
        }
    }
}


Measured memory_bytes: 13152