Hockey Goal
Time limit2sMemory limit1024 MB
Given the height, width, and two depths of a hockey goal frame, find the minimum netting area needed to cover its back, sides, and top.
Problem
The Flatland Minister of Family, Youth and Sports wants hockey to become a national sport. He has ordered hockey rinks built in every locality, ice palaces built in every city, and all necessary equipment bought (for example, goals, sticks, and pucks). A market survey showed that hockey goals are very expensive, so the ministry decided to make them in-house. There is one problem: nobody knows the area of the netting that must be stretched over one goal.
The goal looks as follows:

The height of the goal is meters, the width is meters, the small depth is meters, and the large depth is meters. The net is stretched over the back, the sides, and the top of the goal. To save money, the net is stretched so that its area is minimal.
The first Flatland Games will start soon, and Flatland mathematicians still cannot estimate the cost of the goals. The minister heard of your programming skills and asked you to write a program that solves this problem.
Input
The only line contains four real numbers , , , (, ).
Output
Print to the output file a single number: the total area of netting needed for one hockey goal, with precision .