#2434. 丢失的数字(Missing Number)

    ID: 2434 文件IO (miss) 1000ms 256MiB 尝试: 53 已通过: 11 难度: 7 上传者: 标签>搜索枚举CSES Introductory Problems一维数组

丢失的数字(Missing Number)

Description

You are given all numbers between 1, 2,...,n except one. Your task is to find the missing number.

Format

Input

The first input line contains an integer n.

The second line contains n - 1 numbers. Each number is distinct and between 1 and n (inclusive).

Output

Print the missing number.

Samples

5
2 3 1 5
4

Limitation

  • 2n2 * 10^5
  • Time limit: 1.00 s
  • Memory limit: 512 MB