Watchdog Corporation

No attempts yetTime limit1sMemory limit128 MB

Problem

In northern Kyushu you run a company that rents out watchdogs to fill your customers' orders. What sets your service apart is that you also install fences to make the dogs more effective.

Each dog is kept on a leash tied to a peg. You put up fences along the outer edge of the region the dog can reach, so that anyone who approaches a fence is dealt with by the dog.

A rectangular building may stand near the dog. The dog cannot enter the building, but it can walk around it as far as the leash allows, as shown in Figure F-1. No fence is needed along a wall of the building.

Figure F-1: Example fence layouts (some parts of the fences are omitted).

Given the length of the leash together with the position and size of the building, compute the total length of the fence.

Input

The input consists of several datasets. Each dataset is one line of five integers:

len x1 y1 x2 y2

len is the length of the leash. The building is the rectangle consisting of exactly the points $(x, y)$ with $x_1 < x < x_2$ and $y_1 < y < y_2$, so its walls are parallel to the axes. The peg is at the origin.

You may assume $0 < \mathrm{len} \le 100$, $-100 \le x_1 < x_2 \le 100$, and $-100 \le y_1 < y_2 \le 100$. The peg is never inside the building nor on its border.

The line 0 0 0 0 0 marks the end of the input and is not processed.

Output

For each dataset, print the total length of the fence on its own line, rounded to exactly two digits after the decimal point. Print nothing else.