#atcoderABC070C. Multiple Clocks

Multiple Clocks

Problem Statement

We have NN clocks. The hand of the ii-th clock (1iN)(1≤i≤N) rotates through 360°360° in exactly TiT_i seconds.
Initially, the hand of every clock stands still, pointing directly upward.
Now, Dolphin starts all the clocks simultaneously.
In how many seconds will the hand of every clock point directly upward again?

Constraints

  • 1N1001≤N≤100
  • 1Ti10181≤T_i≤10^{18}
  • All input values are integers.
  • The correct answer is at most 101810^{18} seconds.

Input

Input is given from Standard Input in the following format:

NN

T1T_1

::

TNT_N

Output

Print the number of seconds after which the hand of every clock point directly upward again.

Input 1

2
2
3

Output 1

6

We have two clocks. The time when the hand of each clock points upward is as follows:

  • Clock 11: 22, 44, 66, ...... seconds after the beginning
  • Clock 22: 33, 66, 99, ...... seconds after the beginning

Therefore, it takes 66 seconds until the hands of both clocks point directly upward.

Input 2

5
2
5
10
1000000000000000000
1000000000000000000

Output 2

1000000000000000000