#UnknownID2. XHXMMMl3JUl3Wg#*'`(
XHXMMMl3JUl3Wg#*'`(
Statement
In order to make the "Sea Battle" game more interesting, Boris decided to add a new ship type to it. The ship consists of two rectangles. The first rectangle has a width of and a height of , while the second rectangle has a width of and a height of , where . In this game, exactly one ship is used, made up of two rectangles. There are no other ships on the field.
The rectangles are placed on field in the following way:
- the second rectangle is on top the first rectangle;
- they are aligned to the left, i.e. their left sides are on the same line;
- the rectangles are adjacent to each other without a gap.
See the picture: the first rectangle is colored red, the second rectangle is colored blue.
Formally, let's introduce a coordinate system. Then, the leftmost bottom cell of the first rectangle has coordinates , the rightmost top cell of the first rectangle has coordinates , the leftmost bottom cell of the second rectangle has coordinates and the rightmost top cell of the second rectangle has coordinates .
After the ship is completely destroyed, all cells neighboring by side or a corner with the ship are marked. Of course, only cells, which don't belong to the ship are marked. On the pictures in the notes such cells are colored green.
Find out how many cells should be marked after the ship is destroyed. The field of the game is infinite in any direction.
Format
Input
Four lines contain integers and ( , ) — the width of the first rectangle, the height of the first rectangle, the width of the second rectangle and the height of the second rectangle. You can't rotate the rectangles.
Output
Print exactly one integer — the number of cells, which should be marked after the ship is destroyed.
Sample
2
1
2
1
12
2
2
1
2
16
相关
在下列比赛中: