eolymp
Problems

School Olympiad

School Olympiad

At school programming contest the participants were asked to solve two problems. a students totally coped with the given tasks, and b students solve nothing.

How many participants were in competition if there was accepted c correct submitions for the first task, and d submitions for the second task.

Input

Nonnegative integers a, b, c и d, not greater than 100.

Output

Number of participants at school programming contest.

Time limit 1 second
Memory limit 64 MiB
Input example #1
1 2 3 4
Output example #1
8