262. A gentleman, having a certain number of shillings in his
possession, made up his mind to visit 17 different barracks and treat
the soldiers, and he did so in the following manner:--On going into
the first barracks, he gave the sentry one shilling and then spent
half of his shillings in the canteen amongst the soldiers, and on
coming out of barracks again he gave the sentry another shilling;
he repeated the same until he had finished with the seventeenth
barracks, and had no more shillings left. How many had he when he
commenced?