#include <iostream>
using namespace std;
int main()
{
    int n, i;
    int a[100];
    while (cin >> n)
    {
        int max;
        cin >> a[0];
        max = a[0];
        for (i = 1; i<n; i++)
        {
            cin >> a[i];
            if (a[i]>max)
                max = a[i];
        }
        int k = 0, j;
        for (j = max;; j++)//2 5 7 j=7;
        {
            for (i = 0; i<n; i++)
            {
                if (j%a[i] != 0)
                    break;
            }
            if (i == n)// j%a[i]==0
                break;
        }
        cout << j << endl;

    }
    return 0;
}