Starting with some gold coins and some empty treasure chests, I tried to put 9 gold coins in each treasure chest, but that left 2 treasure chests empty. So instead I put 6 gold coins in each treasure chest, but then I had 3 gold coins left over. How many gold coins did I have?