integer*8::N,M
  read *, N, M
  print '(i0)',((N/M)/1000)*1000
end