跳到主要内容
图灵 OJTURING / ONLINE JUDGE

#F1998. Forgotten Episode

  • ID: 2004
  • 传统题
  • 2000ms
  • 256MiB
  • 尝试: 0
  • AC · 已通过: 0
  • 教学难度:入门
  • 上传者:
  • 模拟
  • 编程与模拟
  • 入门
  • 难度
  • 共享题库
  • Codeforces
  • 英文题面
  • 题目来源
  • 题面语言

Forgotten Episode

题目描述

A. Forgotten Episode
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Polycarpus adores TV series. Right now he is ready to finish watching a season of a popular sitcom "Graph Theory". In total, the season has n episodes, numbered with integers from 1 to n.

Polycarpus watches episodes not one by one but in a random order. He has already watched all the episodes except for one. Which episode has Polycaprus forgotten to watch?

Input

The first line of the input contains integer n (2≤n≤100000)− the number of episodes in a season. Assume that the episodes are numbered by integers from 1 to n.

The second line contains n-1 integer a1,a2,...,an (1≤ai≤n)− the numbers of episodes that Polycarpus has watched. All values of ai are distinct.

Output

Print the number of the episode that Polycarpus hasn't watched.

Examples
Input
10
3 8 10 1 7 9 6 5 2
Output
4

题目来源:fps-www.educg.net-codeforce-1-2833.xml.zip;FPS 共享题包,题包内第 1585 题。保留原作者与原赛事署名。