L,K=map(int,input().split()) cnt=0 while 1: if L-2*K<=0: break elif L-200*K>0: L=L-200*K cnt+=100*K else: L=L-2*K cnt+=K print(cnt)