A city intersection has several traffic lights. Each light i turns green every c_i seconds (it is green at time 0, c_i, 2*c_i, ...). All lights start green at time 0.
Given the cycle lengths of n lights, find the first strictly-positive time at which every light is green simultaneously again.
Input format
Line 1: an integer n.
Line 2: n space-separated integers, the cycle lengths c_1 .. c_n.
Output format
A single integer: the smallest positive time at which all lights are green together.
Constraints
- 1 <= n <= 10
- 1 <= c_i <= 30