I went to the candy store last weekend and I bought a total of 10 packs of candy. I bought M&Ms for $1 per pack and Twizzlers for 0.5 per pack. I spent a total of $6. How many packs of M&Ms did I buy?