A baby pool contained 50 gallons of water. Water leaked out of the pool at a rate of 10 gallons every 3 days. At this rate, how many days did it take all 50 gallons of water to leak out of the barrel?