lst=[] 
for i in range(5):    
    lst.append(int(input()))
for a in range(i):   
    small=lst[i]     
    if(a<small):        
    small=a 
print(small)      

f3b04d1357073df16502011bd25660dffed7a96f
lst=[] 
for i in range(5):    
    lst.append(int(input()))
for a in range(i):   
    small=lst[i]     
    if(a<small):        
    small=a 
print(small)      
