Time limit
2s
Memory limit
128 MB
You want to decorate a room floor. Consider the following infinite plane pattern made from 1x5 wooden boards. The upper-left coordinate is (0, 0), the x-coordinate increases from left to right, and the y-coordinate increases from top to bottom.
From this pattern, choose the rectangular region whose upper-left corner is (x1, y1) and whose lower-right corner is (x2, y2). This chosen region must be assembled for the room.
A nearby store sells only 1x5 wooden boards. Shorter boards such as 1x3 and 1x2 can be made by cutting a 1x5 board. For example, one 1x5 board can be cut into one 1x3 board and one 1x2 board, or into two 1x2 boards and one 1x1 board.

The figure above shows the case where (x1, y1) is (8, 5) and (x2, y2) is (20, 16). It requires twenty-three 1x5 pieces, six 1x2 pieces, and five 1x1 pieces. Therefore, buying 27 wooden boards is enough.
Given x1, y1, x2, and y2, compute the minimum number of wooden boards that must be bought. Unneeded scraps may be discarded.
The first line contains four integers x1, y1, x2, and y2.
Print the minimum number of wooden boards that must be bought.