Two pipes can fill an empty tank separately in 24 minutes and 40 minutes respectively and a third pipe can empty 30 gallons of water per minute. If all the three pipes are open, empty tanks becomes full in one hour. The capacity of tank (in gallons) is