Peter has 18 dimes. He uses 12 dimes to buy a drink. The number of dimes he has left is one half the number of pennies he has. How many pennies does Peter have? Write an equation to solve the problem. Please help!