The container that holds the water for the football team is 2/3 full. After pouring out 3 gallons of water, it is ½ full. How many gallons can the container hold?