C,Y=map(int, input().split()) #A=list(map(int, input().split())) D=[10000,5000,2000,1000,500,100,50,10,5,1] E=[] for d in D: c=Y//d E.append(c) Y-=d*c #print(E) c=0 if E[3]>=C: print('no exchange') exit() for i in range(len(D)): if D[i]>=100: c+=(D[i]//100)*E[i] if c