c,y=map(int,input().split()) y//=100 if y=c: print('no exchange') else: if y%5>=c%5: print((c//5)*5+(y%5)) else: print(-(-c//5)*5+(y%5))