eolymp
bolt
Try our new interface for solving problems
Problems

Garland

Garland

There are n lamps. For each lamp the flashing period is given in seconds. Initially all the lamps are flashed. Determine when they all simultaneously flash next time.

Input

The first line gives the number of lamps n (2n10). The second line contains n positive integers – the period of lamp's flashing, each no more than 100.

Output

Print the time in seconds when all the lamps will flash simultaneously again.

Time limit 1 second
Memory limit 128 MiB
Input example #1
3
3 6 8

Output example #1
24
Source 2013 Novosibirsk, May 5, Problem А