Lawn#459

Lawn

2 seconds
64 megabytes
Medium

Farmer Ivan has been taking care of his lawn since his youth. The lawn can be considered as an infinite plane where, at every point with integer coordinates, a single tuft of grass grows.

One Sunday, Ivan used his lawn mower to cut a certain rectangular area of the lawn. The sides of this rectangle are parallel to the coordinate axes, and its two opposite vertices have coordinates (X_1, Y_1) and (X_2, Y_2). Note that the tufts of grass located on the border of the rectangle are also considered mowed.

Satisfied with the result, Ivan bought and installed a sprinkler on the lawn. The sprinkler was placed at the point (X_3, Y_3) and has a radius . Thus, the sprinkler waters all tufts of grass whose distance to the point (X_3, Y_3) does not exceed .

Everything was fine, but Ivan became interested in the following question: how many tufts of grass were both mowed and watered this Sunday?

Write a program that will answer Ivan's question.

Input

The first line contains four integers X_1, Y_1, X_2, Y_2 (-10^5 \le X_1 < X_2 \le 10^5; -10^5 \le Y_1 < Y_2 \le 10^5).

The second line contains three integers X_3, Y_3, (-10^5 \le X_3, Y_3 \le 10^5; 1 \le R \le 10^5).

Output

Output the number of tufts of grass that were both mowed and watered.

Illustration for the example

Examples

Example 1

Loading
Loading