
The city of Haka is well known for its traffic jams. This has led to the emergence of many problemsetters, as people often come up with new programming problems while waiting in traffic. Most wide roads in Haka have fences along the divider, and these fences commonly use perforated steel sheets (as shown in the figure on the left).
In this problem, we will discuss the manufacturing process of a particular type of perforated steel strip, and you are asked to solve a problem related to this process.

Each rectangular steel strip has two circular holes in every row. Holes in the same row are units apart. Holes in consecutive rows (that is, in the same column) are also units apart. Each hole is at a distance from the nearest edge. All holes have radius . Therefore, the width of each metal strip is (4d + 4r), and the initial length of the strip is . Such a strip is shown in the right image. Holes are drilled only if they can be cut following these rules. The circular steel sheets obtained from the holes and the unused part of the strip (for example, the part below the red dotted line in the right image) are melted to create a new steel strip of width (4d + 4r). Then, holes are cut in the new strip according to the same rules. This process repeats until the newly created strip is so small that it is impossible to create two holes in one row, subject to the above restrictions.
Let C(d, r, S) denote the total number of holes produced. Given r_{min} (the minimum possible value of ), r_{max} (the maximum possible value of ), d_{min} (the minimum possible value of ), d_{max} (the maximum possible value of ), and , you need to find the total number of holes produced.
You may assume all values of and are integers. The initial and all subsequent strips have equal and uniform thickness everywhere. Your method should be efficient enough for the constraints.
The input file contains up to test cases. Each test case is presented on a single line, containing five integers:
r_{min} (5000 \leq r_{min} \leq 10\,000), r_{max} (0 \leq r_{max} - r_{min} \leq 1\,000), d_{min} (1 \leq d_{min} \leq 21), d_{max} (0 \leq d_{max} - d_{min} \leq 100), (1\,000\,000 \leq S \leq 2\,000\,000\,000).
The input ends with a line containing five zeros. This line should not be processed.
For each input line, output a single integer which denotes the total number of holes produced, summed for all and in the given ranges. The value will fit into a -bit signed integer. Answers with a relative error not exceeding 10^{-7}\% will be accepted.
Example 1