Let's shoot down the balloon.
Winnie the Pooh and Piglet are on another adventure to steal honey from the bees, and once again, they've found themselves in a tricky situation. Piglet needs to use his hunting rifle to pop the balloon that Winnie the Pooh has used to float up to the honey-filled hollow. The goal is to hit the balloon without harming Winnie the Pooh. Your task is to determine the optimal shooting position for Piglet.
In this scenario, Winnie the Pooh is represented as a sphere with a radius of (P). The center of this sphere is located at a height of (H_p) above the ground. Directly above Winnie, there is another sphere representing the balloon, with a radius of (S). The center of the balloon is positioned at a height of (H_s) above the ground. Both spheres are aligned vertically, sharing the same central axis. It is guaranteed that these spheres do not intersect, although they may touch.
Assuming Piglet's rifle fires in a perfectly straight line, calculate the minimum distance (L) that Piglet must stand from the takeoff point to successfully hit the balloon. The balloon is considered successfully hit if the bullet's trajectory at least grazes its surface, and Winnie the Pooh is unharmed if the bullet's trajectory does not touch him.
Input
The input consists of a single line containing four positive integers: (P), (H_p), (S), and (H_s), each not exceeding (10000).
Output
Output the minimum distance from the takeoff point from which Piglet can hit the balloon with the rifle, ensuring a precision of at least (5) decimal places.