题目描述
Problem Description
kawatea is addicted to a game where he hits multiple amylase earls falling from the sky in sequence to the rhythm of the music.
This game has a combo system. If he successfully hits an amylase earl to the rhythm, the combo count increases by 1. If he fails to hit, the combo count resets to 0.
When he finishes hitting a total of \( n \) amylase earls, the maximum combo count achieved is \( m \).
Write a program to find the minimum number of failures that could have occurred.
Input Format
The input is given in the following format:
\( n \) \( m \)
- The first line contains an integer \( n \) ( \( 1 \leq n \leq 1{,}000{,}000{,}000 \) ), representing the number of amylase earls, and an integer \( m \) ( \( 1 \leq m \leq n \) ), representing the maximum combo count.
Output Format
Output the minimum number of failures in one line.
End with a newline and do not include any extra characters or blank lines.
Sample Input and Output
Sample Input #1
10 5
Sample Output #1
1
Sample Input #2
100 9
Sample Output #2
10
Notes/Hints
None
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
10 5
样例输出
1