A,B=map(int,input().split()) ans=10**10 for a in range(1000): for b in range(1000): if a==b==0: continue if ((1000*a)//(a+b)+5)//10==A and ((1000*b)//(a+b)+5)//10==B: ans=min(ans,a+b) print(ans)