unittest
{
	assert( [ "2", "2", "3" ].parse.expand.solve == 6 );
	assert( [ "5", "2", "5", "10", "1000000000000000000", "1000000000000000000" ].parse.expand.solve == 1000000000000000000 );
}



import std.algorithm;
import std.conv;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.strip.to!( long );
	auto ts = new long[ n ];
	foreach( ref t; ts )
	{
		input.popFront;
		t = input.front.strip.to!( long );
	}
	return tuple( ts );
}

auto solve( long[] ts )
{
	auto us = ts.sort!( ( a, b ) => b < a ).uniq;
	auto r = us.front;
	us.popFront;
	
	// 最小公倍数を計算
	foreach( u; us )
	{
		if( r % u != 0 ) r = r * u / gcd( r, u );
	}
	
	return r;
}
