Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

No tag edit access

E. A rectangle

time limit per test

0.5 secondsmemory limit per test

64 megabytesinput

standard inputoutput

standard outputDeveloping tools for creation of locations maps for turn-based fights in a new game, Petya faced the following problem.

A field map consists of hexagonal cells. Since locations sizes are going to be big, a game designer wants to have a tool for quick filling of a field part with identical enemy units. This action will look like following: a game designer will select a rectangular area on the map, and each cell whose center belongs to the selected rectangle will be filled with the enemy unit.

More formally, if a game designer selected cells having coordinates (*x*_{1}, *y*_{1}) and (*x*_{2}, *y*_{2}), where *x*_{1} ≤ *x*_{2} and *y*_{1} ≤ *y*_{2}, then all cells having center coordinates (*x*, *y*) such that *x*_{1} ≤ *x* ≤ *x*_{2} and *y*_{1} ≤ *y* ≤ *y*_{2} will be filled. Orthogonal coordinates system is set up so that one of cell sides is parallel to *OX* axis, all hexagon centers have integer coordinates and for each integer *x* there are cells having center with such *x* coordinate and for each integer *y* there are cells having center with such *y* coordinate. It is guaranteed that difference *x*_{2} - *x*_{1} is divisible by 2.

Working on the problem Petya decided that before painting selected units he wants to output number of units that will be painted on the map.

Help him implement counting of these units before painting.

Input

The only line of input contains four integers *x*_{1}, *y*_{1}, *x*_{2}, *y*_{2} ( - 10^{9} ≤ *x*_{1} ≤ *x*_{2} ≤ 10^{9}, - 10^{9} ≤ *y*_{1} ≤ *y*_{2} ≤ 10^{9}) — the coordinates of the centers of two cells.

Output

Output one integer — the number of cells to be filled.

Examples

Input

1 1 5 5

Output

13

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/14/2018 02:54:05 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|