Sumy
Krosh loves holidays because he often receives gifts to celebrate them. On this Knowledge Day, he was fortunate to receive a few gifts.
Barash and Losyash visited Krosh to congratulate him. Knowing his fondness for counting, especially adding two numbers, they brought him gifts.
When Krosh opened the gifts, he found that they were nearly identical. Each gift contained blocks numbered from (a) to (b), with each block having a unique number. The only difference was the color: Barash's blocks were blue, and Losyash's were red.
After his guests left, Krosh decided to play with the blocks. He thought of two numbers, (c) and (d), and wrote them down to remember. His task was to select one blue block and one red block such that the sum of their numbers fell between (c) and (d), inclusive. He became curious about how many such combinations were possible.
Input
The first line of the input contains four integers: (a), (b), (c), and (d). These integers satisfy the conditions: (0 a b 10^9) and (0 c d 2 10^9).
Output
Output a single integer representing the number of ways to choose one block of each color such that their sum lies within the specified range.