Pairs#3655

Pairs

1 second
64 megabytes
Very easy

Given two ranges of integers and , determine the number of pairs that satisfy the following conditions:

x \neq y, a \leq x \leq b, c \leq y \leq d.

Input

A single line contains four integers , , , (a \leq b, c \leq d, -10^8 \leq a, b, c, d \leq 10^8).

Output

Output a single line containing the number of valid pairs.

Examples

Example 1

Loading
Loading