I don't understand the problem statement.
I thought, for instance, when I have two stones with value i = 1, then I can combine them to get a stone of level 2. - combining two stones of i = 3, it would be 4 etc. But that is not how it works, when I look at the tests:
The first test case gives two stones one with level 1 and one with level 11. So how can I combine them, so that I get only one stone - as this is the expected answer?