When a projectile is thrown at angle θ with the vertical it reaches the maximum height D. The time of flight of the projectile is