C,Y=map(int,input().split()) Y//=100 if C>Y: print("can't exchange") elif C<=Y%5: print("no exchange") else: ans=C while ans%5!=Y%5: ans+=1 print(ans)