Time

12:42:05
23 May 2012
Version for print

Lawn

   Farmer Ivan from his youth watching his lawn. Lawn can be regarded as a plane, which at every point with integer coordinates, one tuft of grass grows.

   One Sunday Ivan took the mower and vows some rectangular area of lawn. Parties of this site are parallel to the axes, and the two opposite vertices are the points (X1, Y1) and (X2, Y2). It should be noted that the bundles of grass located on the border of the rectangle, also were tonsured.

    Pleased with the result of Ivan bought and installed on the lawn sprinklers. She was placed at coordinates (X3, Y3) and had a radius of the jet R. Thus, the installation began to pour all the beams, the distance from which to point (X3, Y3) is not greater than R.

   Everything was good, but Ivan's interested in the question: how many bundles of grass and was tonsured, and poured into this Sunday?

    Need to write a program that will give an answer to the question of Ivan.


Specifications

   Input

   The first line of the input file contains four integers X1, Y1, X2, Y2 (−100 000 ≤ X1 < X2 ≤ 100 000; −100 000 ≤ Y1 < Y2 ≤ 100 000).

   The second line of the input file contains three integers X3, Y3, R (−100 000 ≤ X3, Y3 ≤ 100 000; 1 ≤ R ≤ 100 000)

   Output

    In the output file should display one integer - the number of tufts of grass, which were tonsured, and watered.

Illustration example

 

prb459


Problem information

Time Limit: 2 seconds
Memory Limit: 64 MB
Balls for the passed test: 5
Complexity: 69% 21/68

Example

Example input

0 0 5 4
4 0 3

Example output

14


← Black and white graphics Problems Tram →