Missing Number

FEC_COD3_TES7
Limits 1s, 512 MB

Given the sum of four numbers and three of those numbers, find the missing number.

All four numbers are positive integers.

Input

The input will contain one integer (the sum of the four numbers) in the first line and three integers (of those four numbers) in the second line.

All numbers in this problem fit in 32-bit signed integers.

Output

Print the missing number.

Sample

InputOutput
10
1 2 3
4

Submit

Login to submit.

Statistics

98% Solution Ratio
MutasimEarliest, Nov '18
MutasimFastest, 0.0s
ADRI56Lightest, 0 B
n4o847Shortest, 19B
Toph uses cookies. By continuing you agree to our Cookie Policy.