If there were only 2 thiefs, thief 1 being the most senior, he would just vote for himself so he's obviously going to keep all the money for himself.
Now if there are 3 thiefs:
thief1 already knows what happens when there are 2 thiefs (thief 1 takes all the money himself and gives nothing to thief 2). So thief 1 proposes that he will take 99 gold coins and give 1 coin to thief 3. So, thief 3 says, well, 1 is better than none, and since i know if i don't vote for thief 1, I get nothing, I should vote for this plan.
If u work out on this futher considering the case for 4 thiefs and then finally for 5 thiefs u will reach d solution told earlier!!