Problem C
DCC líkur
Languages
en
is
Alice, Egill and Máni have gathered among others to play tabletop RPGs. The system they are using is called DCC (Dragon Claw Conundrums). Máni is the GM so he asks Alice and Egill to each throw a die to determine who wins the in-game armwrestling contest they are engaging in. But in DCC bonuses to dice rolls work a bit differently to most other tabletop RPGs where a constant is added to the dice roll. In DCC there is a dice chain which is as follows
Adding
Egill is supposed to roll an
Input
The first line of the input contains two integers
Output
Print the smallest number
Sample Input 1 | Sample Output 1 |
---|---|
5 24 25 |
6 |
Sample Input 2 | Sample Output 2 |
---|---|
24 12 70 |
0 |
Sample Input 3 | Sample Output 3 |
---|---|
5 30 51 |
Vonlaust! |