#K42212. Find the Missing Number

    ID: 27038 Type: Default 1000ms 256MiB

Find the Missing Number

Find the Missing Number

You are given a list of unique consecutive integers with exactly one integer missing. The list may include negative numbers as well. Your task is to find and print the missing number.

The integers are provided in a single line separated by spaces. It is guaranteed that the sequence, when completed, forms an arithmetic progression with a common difference of 1.

Note: The input is given via standard input (stdin) and the output should be printed to standard output (stdout).

inputFormat

A single line containing space-separated integers representing a sequence of consecutive integers with one missing number. For example: 1 2 4 5

outputFormat

Print a single integer which is the missing number from the sequence.## sample

1 2 4 5
3