Given that the person is left with no toffees after distributing them to the fifth student. Also given that to each student the person gave one more than half the number of toffees at that stage. For these types of problems, better we go for backward calculation. If the person had not given 1 extra toffee, he would have left with that toffee. This represents that he had 2 toffees at that stage. In the previous stage i.e in 4th stage he should have (2+1)×2 i.e 6 toffees In the third stage, he should have (6+1)×2 i.e 14 toffees. In the second stage, he should have (14+1)×2 i.e 30 toffees. In the first stage, he should have (30+1)×2 i.e 62 toffees. Hence he initially had 62 toffees.