C,Y=map(int,input().split()) Y//=100 if Y=C:print("no exchange");exit() ans=Y%5 C-=Y%5 ans+=(C+4)//5*5 print(ans)