Division of the Treasure#6274

Division of the Treasure

1 секунда
64 мегабајти
Многу лесно

The pirates have successfully divided a treasure of 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, coins remained, which were set aside for future use.

Determine the total number of pirates.

Влез

Two natural numbers and are provided (1 \le n < m \le 10^6).

Излез

Print the total number of pirates.

Примери

Пример 1

Loading
Loading