Pump A can fill a tank in 42 minutes, while pump B can fill the same tank in 7 minutes. Both pumps are turned on together to fill the empty tank, but when tank became half full, pump B stops working and rest of the tank is filled by pump A only. How long it took to fill the tank?