(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(define (FLOOR foo bar)
  (- foo (modulo foo bar))
)

(let (
      (N (read))
      (M (read))
     )
  (System.out.println (/ (FLOOR N (* M 1000)) M))
)