A stone is thrown at an angle θ to the horizontal reaches a maximum height H, then the time of flight of stone will be