There are fancy ways of doing this sort of thing, however from my experience in exams you are frankly best working this out by inspection and not worrying about doing it in a fancy way - the examiners want to test your mathematical aptitude not your ability to memorise complex methods.
The sequence of doubling can be done at light speed in your head, 1 2 4 8 16 32 etc.
Let's have a stab and go for 32:
32+16+8+4+2+1 = 63 - magic, inspection works better than whatever the formula book says (that's my pro tip tbh)
Remember however since the answer is exact, the last 32 inch piece does not need to be cut, therefore the string is cut 5 times.