#K80147. Maximum Subtractions

    ID: 35466 Type: Default 1000ms 256MiB

Maximum Subtractions

Maximum Subtractions

Given two non-negative integers \(N\) and \(M\), compute the maximum number of times \(M\) can be subtracted from \(N\) before \(N\) becomes less than or equal to zero. In mathematical terms, you need to find the largest integer \(k\) such that \(N - k \times M > 0\) (if \(N > 0\)), which is equivalent to \(\lfloor N/M \rfloor\). Note that if \(N\) is initially zero, the answer is 0.

inputFormat

The input consists of a single line containing two space-separated integers (N) and (M).
Constraints: (0 \le N \le 10^{9}) and (1 \le M \le 10^{9}).

outputFormat

Output a single integer representing the maximum number of times (M) can be subtracted from (N) before it becomes non-positive.## sample

10 3
3