on tuesday bill bought five hats. on wednesday half of all the hats he had were destroyed. on thursday there were only 17 left. how many did she have on monday?