M = input() N = input() if M/N >1000: T= M/N print str(T)[:-3]+"000" else: print 0