# -*- coding: utf-8 -*- N, = map(int, raw_input().split()) M, = map(int, raw_input().split()) ans = N / (1000 * M) ans *= 1000 print ans