Teresa gave two-thirds of her peanuts to Gabe. Then she gave ine-half of the remaining peanuts to Carlos. She had 1 peanuts left. How many did she begin with?