#D10358. Light
Light
Light
Problem
There are streetlights on a two-dimensional square of . Gaccho wants to start with and go to . Gaccho is afraid of dark places, so he only wants to walk in the squares that are brightened by the streetlights. Initially, all streetlights only brighten the squares with the streetlights. So, Gaccho decided to set the cost for his favorite streetlight . There may be street lights for which no cost is set. By consuming the cost , the streetlight can brighten the range within in Manhattan distance around the streetlight. However, the cost is a positive integer. Gaccho can move to the adjacent square in either the up, down, left, or right direction. Gaccho decided to set the total value of to be the minimum. Find the total value at that time.
The Manhattan distance between two points and is represented by + .
Constraints
The input satisfies the following conditions.
- There are no multiple streetlights at the same coordinates
Input
The input is given in the following format.
...
All inputs are given as integers. , , and are given on the first line, separated by blanks. In the following line, the coordinates , of the streetlight are given, separated by blanks.
Output
Output the minimum value of the total value of on one line.
Examples
Input
10 10 1 6 6
Output
10
Input
5 10 3 3 9 2 8 5 1
Output
8
Input
1 1 1 1 1
Output
0
inputFormat
input satisfies the following conditions.
- There are no multiple streetlights at the same coordinates
Input
The input is given in the following format.
...
All inputs are given as integers. , , and are given on the first line, separated by blanks. In the following line, the coordinates , of the streetlight are given, separated by blanks.
outputFormat
Output
Output the minimum value of the total value of on one line.
Examples
Input
10 10 1 6 6
Output
10
Input
5 10 3 3 9 2 8 5 1
Output
8
Input
1 1 1 1 1
Output
0
样例
1 1 1
1 1
0