Programming olympiad#8288

Programming olympiad

1 second
128 megabytes
Easy (≈1000)

There are participants arrived to ACM competition. As a result of the survey, the jury found that participants code in C, in Python, in Pascal, simultaneously know C and Python, - Python and Pascal, - C and Pascal. Given the values , , , , , , , find the number of participants who program in three programming languages.

Input

The first line contains seven integers , , , , , , , the values do not exceed .

Output

Print the number of participants who write the code in three programming languages.

Examples

Example 1

Loading
Loading