Ryan has 9 quarters in his piggy bank. He uses 3 quarters to buy a pencil from the school bookstore, leaving him with some remaining quarters. His sister gives him pennies and tells him he now has 35 quarters worth of coins in total. How many quarters' worth of pennies did Ryan's sister give him?