There are n participants arrived to ACM competition. As a result of the survey, the jury found that a participants code in C, b in Python, c in Pascal, x simultaneously know C and Python, y - Python and Pascal, z - C and Pascal. Given the values n, a, b, c, x, y, z, find the number of participants who program in three programming languages.
The first line contains seven integers n, a, b, c, x, y, z, the values do not exceed 100.
Print the number of participants who write the code in three programming languages.