a,b,c=map(int,input().split()) d=0 e=0 while True: d+=1 if d%a==1 and d%b==1 and d%c==1: print(d) e+=1 if e==10: break