Problem H
EIEIO
Languages
en
is

Jörmunrekur has grown tired of all these programming problems. To avoid the digital world he has decided to move into the countryside and become a farmer.
Naturally he had some trouble when he was separating the sheep for the first time. He was trying to count how many sheep were already separated, but because the other people present were wearing wool outfits he ended up counting them as well. Then just as he finished counting he slipped in the mud and ended up laying flat on the ground. It wasn’t all bad he thought though, as from this angle he had the idea of counting all the legs he could see. Using these two counts he figured he could find the answer.
Input
The input consists of two lines. The first line contains a single integer $n$, the number of sheep and people in total, not including Jörmunrekur. The second line contains a single integer $m$, the number of legs Jörmunrekur counted. He did not count his own legs. No creature present is missing any limbs. If Jörmunrekur saw a sheep or person he saw all their legs.
Output
Print the number of sheep Jörmunrekur counted. If there is no chance Jörmunrekur counted correctly, instead print “Rong talning”.
Scoring
Group |
Points |
Constraints |
1 |
100 |
$0 \leq n, m \leq 1\, 000$ |
Sample Input 1 | Sample Output 1 |
---|---|
3 10 |
2 |
Sample Input 2 | Sample Output 2 |
---|---|
3 12 |
3 |
Sample Input 3 | Sample Output 3 |
---|---|
3 14 |
Rong talning |