A man entered a store and spent half of the money in his pocket. When he left, he had just as many cents as he had dollars when he went in and half as many dollars as he had cents when he went in. His pocket was not empty upon arriving. How much money did he have on him when he entered?