h = int(input())
a = int(input())
b = int(input())
c = int(input())
d= str(a*b*c)
r=[]
for i in range(int(d)):
    f=i+1  
    if int(d) % f == 0:
        r.append
        
        
        
        
print('217')














