import math b = int(input())/1000 k = int(input()) if b % k == 0: o = 1000 * (b/k) else: o = 1000 * math.floor(b/k) print(int(o))