#!/usr/bin/perl use strict; use warnings; my $n = <>; my $m = <>; $n /= 1000; my $ans = 0; if($n < $m) { $n = 0; } else { $n -= ($n % $m); $n /= $m; $n *= 1000; } print "$n\n"; exit;