A water tank can be filled by two pipes P and Q in 60 minutes and 30 minutes respectively. How many minutes will it take to fill the empty tank if pipes P and Q are opened for first half of the time, after which only pipe Q is opened for next half of the time?