//优化版

#include<stdio.h>
#include<vector>
#include<math.h>
using namespace std;

int SG(int x,int y)
{
    int z = 0;
    int Big,Small;
    Big = x;
    Small = y;
    
    while(Small!=0)
    {
        z = Big%Small;
        Big = Small;
        Small = z;
    }
    
    return x*y/Big;
}

int TSG(int a,int b,int c)
{
    return SG(a,SG(b,c));
}

int main(void)
{
    int nums[5];
    
    cin>>nums[0]>>nums[1]>>nums[2]>>nums[3]>>nums[4];
    
    int res = INT32_MAX;
    
    for(int i=0;i<=2;i++)
        for(int j=i+1;j<=3;j++)
            for(int z=j+1;z<=4;z++)
                res = min(TSG(nums[i],nums[j],nums[z]),res);
    
    cout<<res;
}

/*
int main(void)
{
    int nums[5];
    
    cin>>nums[0]>>nums[1]>>nums[2]>>nums[3]>>nums[4];
    
    for(int i=1;;i++)
    {
       
        
        for(int j=0;j<5;j++)
        {
            int count = 0;
            
            for(int k=0;k<5;k++)
            {
                if(nums[j]>=nums[k]&&(nums[j]*i)%nums[k]==0) 
                {
                    //cout<<"num[j]:"<<nums[j]<<" nums[i]:"<<nums[i]<<endl;
                    
                    count++;
                }
                
                if(count>=3) 
                {
                    cout<<nums[j]*i;
                    return 0;
                }
            }
            
            
        }
        
    }
    
    
    */