Division of the Treasure
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
The pirates have successfully divided a treasure of m gold coins among themselves, with each pirate receiving a share based on their rank and experience. The youngest pirate took one coin, and each following pirate took one more coin than the pirate before them. After the last pirate received their share, n coins remained, which were set aside for future use.
Determine the total number of pirates.
Input
Two natural numbers m and n are provided (1 ≤ n < m ≤ 10^6
).
Output
Print the total number of pirates.
Examples
Input #1
Answer #1
Submissions 3K
Acceptance rate 49%