John noticed that the amount he was paying for his lunch was a rearrangement of the digits of the amount of money he had in his pocket, and that the money he had left over was yet another rearrangement of the same three digits! How much money did John start with?