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 a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ n) — the numbers of episodes that Polycarpus has watched. All values of a_{i} 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

Difficulty: EASY

Solutions:
n = int(input())
a = list(map(int, input().split()))
a.sort()
m = len(a)
flag = 1
for i in range(1, m + 1):
	if i != a[i - 1]:
		print(i)
		flag = 0
		break
if flag == 1:
	print(n)


n = int(input())
a = list(map(int, input().split()))
s = n * (n + 1) // 2
sa = sum(a)
print(s - sa)


n = int(input())
a = sorted([int(i) for i in input().split()])
k = n
for i in range(n - 1):
	if a[i] != i + 1:
		k = i + 1
		break
print(k)


n = int(input())
l = list(map(int, input().split()))
l.sort()
for i in range(1, n + 1):
	if i == n:
		print(n)
		break
	if l[i - 1] != i:
		print(i)
		break


n = int(input())
a = []
for i in range(n + 1):
	a.append(0)
b = [int(i) for i in input().split()]
for i in range(n - 1):
	a[b[i]] = 1
for i in range(1, n + 1):
	if a[i] == 0:
		print(i)
		break


import sys
from collections import defaultdict
from heapq import nlargest
Input = lambda : map(int, input().split())
n = int(input())
a = list(Input())
res = [-1] * n
for i in range(n - 1):
	res[a[i] - 1] = 1
for i in range(n):
	if res[i] == -1:
		print(i + 1)


n = int(input())
ai = list(map(int, input().split()))
print(n * (n + 1) // 2 - sum(ai))


n = int(input())
ser = {i for i in range(1, 1 + n)}
smotr = set(map(int, input().split()))
for i in ser:
	if i not in smotr:
		print(i)
		break


n = int(input())
l = list(map(int, input().split()))
l = set(l)
l1 = [i for i in range(1, n + 1)]
l1 = set(l1)
l1 = l1 - l
l1 = list(l1)
l1 = [str(i) for i in l1]
print(' '.join(l1))


a = int(input())
l = list(map(int, input().split()))
l.sort()
for j in range(a - 1):
	if l[j] != j + 1:
		print(j + 1)
		break
	elif j == a - 2:
		print(a)


n = int(input())
a = list(map(int, input().split()))
print(n * (n + 1) // 2 - sum(a))


n = int(input())
watched = list(map(int, input().split()))
total = sum(list(range(1, n + 1)))
for i in watched:
	total -= i
print(total)


n = int(input())
s = set(map(int, input().split()))
for i in range(1, n + 1):
	if not i in s:
		print(i)
		break


n = int(input())
arr = map(int, input().split())
ans = n * (n + 1) // 2 - sum(arr)
print(ans)


n = int(input())
a = list(range(1, n + 1))
s = list(map(int, input().split()))
a = set(a)
s = set(s)
p = a.difference(s)
p = list(p)
print(p[0])


n = int(input())
e = list(map(int, input().split(' ')))
s = n * ((n + 1) / 2)
total = sum(e)
print(int(s - total))


n = int(input())
a = [int(i) for i in input().split()]
n = n * (n + 1) // 2
for i in a:
	n -= i
print(n)


epi = int(input())
watched = input().split()
e1 = ['0'] * epi
for i in watched:
	j = int(i)
	e1[j - 1] = i
v = 0
while v < len(e1):
	if '0' == e1[v]:
		print(v + 1)
	v += 1


print(next(iter(set(range(1, int(input()) + 1)) - set(map(int, str.split(input()))))))


n = int(input())
x = list(map(int, input().split()))
x = sorted(x)
xx = []
for i in range(1, n + 1):
	xx.append(i)
print(sum(xx) - sum(x))


n = int(input())
a = set(input().split())
b = set()
for i in range(1, n + 1):
	b.add(str(i))
for i in b.difference(a):
	print(i)


n = int(input())
a = list(map(int, input().split()))
a.sort()
for x in range(len(a)):
	if a[x] != a[-1] and a[x] + 1 != a[x + 1]:
		print(a[x] + 1)
		break
else:
	if a[0] != 1:
		print(1)
	else:
		print(n)


n = int(input())
a = set(map(int, input().split()))
print(list(set(range(1, n + 1)) - a)[0])


n = int(input())
s = [int(v) for v in input().split()]
t = sum(range(1, n + 1))
for i in s:
	t -= i
print(t)


import sys

def main():
	(n, *l) = map(int, sys.stdin.read().strip().split())
	return n * (1 + n) // 2 - sum(l)
print(main())


n = int(input())
s = set((int(i) for i in input().split()))
ss = set((int(i) for i in range(1, n + 1)))
k = list(ss.difference(s))
print(k[0])


n = int(input())
b = [int(b) for b in input().split()]
l = []
for i in range(1, n + 1):
	l.append(i)
print(*set(l) ^ set(b))


print((set(range(1, int(input()) + 1)) - set(map(int, input().split()))).pop())


n = int(input())
s = sum(map(int, input().split()))
print(n * (n + 1) // 2 - s)


n = int(input())
x = [int(x) for x in input().split()]
print(int(n * (n + 1) / 2 - sum(x)))


number = int(input(''))
myDict = {}
arr = input('').split(' ')
for x in arr:
	t = int(x)
	myDict[t] = 1
cur = 1
lastNum = True
for x in sorted(myDict):
	if x != cur:
		print(cur)
		lastNum = False
		break
	cur += 1
if lastNum:
	print(number)


n = int(input())
c = set(map(int, input().split()))
for x in range(1, n + 1):
	if x not in c:
		print(x)


X = int(input())
print(X * (X + 1) // 2 - sum(list(map(int, input().split()))))


(f, n, l) = (0, int(input()), sorted(map(int, input().split())))
for x in range(n - 1):
	if l[x] != x + 1:
		print(x + 1)
		f = 1
		break
if f == 0:
	print(n)


n = int(input())
s = sum([int(i) for i in input().split()])
print(n * (n + 1) // 2 - s)


n = int(input())
s = list(map(int, input().split()))
l = list(range(1, n + 1))
l = set(l)
s = set(s)
r = l.difference(s)
r = list(r)
print(r[0])


n = int(input())
a = sorted(list(map(int, input().split())))
if a[-1] != n:
	print(n)
else:
	for i in range(len(a)):
		if a[i] != i + 1:
			print(i + 1)
			break


n = int(input())
a = [int(i) for i in input().split()]
k = 0
for i in range(1, n + 1):
	k = k ^ i
for i in range(n - 1):
	k = k ^ a[i]
print(k)


season = int(input())
episodes = input().split()
episodes = list(map(int, episodes))
episodes.sort()
sm = sum(range(season + 1))
for i in episodes:
	sm = sm - i
print(sm)


n = int(input())
print((n * n + n) // 2 - sum(list(map(int, input().split()))))


from collections import Counter
n = int(input())
c = Counter([int(i) for i in input().split()])
for i in range(1, n + 1):
	if c[i] == 0:
		print(i)


n = int(input())
e = list(map(int, input().split()))
print(int(n * (n + 1) / 2) - sum(e))


n = int(input())
ser = {x for x in range(1, n + 1)}
serw = {int(x) for x in input().split()}
print(list(ser - serw)[0])


reg = int(input())
list = []
re = input().split()
for i in range(0, reg - 1):
	list.append(int(re[i]))
lis = sorted(list)
if lis[0] == 2:
	print(1)
elif lis[len(lis) - 1] == reg - 1:
	print(reg)
else:
	for j in range(0, len(lis) - 1):
		if lis[j + 1] - lis[j] == 2:
			print((lis[j + 1] + lis[j]) // 2)
			break


n = int(input())
A = list(map(int, input().split()))
A.sort()
A.append(0)
B = []
for i in range(1, n + 1):
	B.append(i)
for j in range(n):
	if A[j] != B[j]:
		print(B[j])
		break


import sys
input = sys.stdin.buffer.readline
n = int(input())
arr = list(map(int, input().split()))
arr.sort()
z = 0
for i in range(0, n - 1):
	if arr[i] == i + 1:
		continue
	else:
		print(i + 1)
		z = 1
		break
if z == 0:
	print(n)


from math import *
from cmath import *
from itertools import *
from decimal import *
from fractions import *
from sys import *
from types import CodeType, new_class
n = int(input())
d = [0] * (n + 1)
for x in input().split():
	d[int(x)] = 1
print(d[1:].index(0) + 1)


n = int(input())
p = input().split()
l = []
i = 0
while i < n - 1:
	l.append(int(p[i]))
	i = i + 1
l.sort()
i = 0
while i < n - 1:
	if i + 1 != l[i]:
		break
	i = i + 1
print(i + 1)


n = int(input())
print(n * (n + 1) // 2 - sum(sorted(list(map(int, input().split())))))


n = int(input())
set_ = set(map(int, input().split()))
for i in range(1, n + 1):
	if i not in set_:
		print(i)
		exit()


total_episodes = int(input())
watched_episodes = list(map(int, input().split()))
total_sum = total_episodes * (total_episodes + 1) // 2
watched_sum = sum(watched_episodes)
print(total_sum - watched_sum)


n = int(input())
a = list(map(int, input().split()))
a.sort()
k = 1
for i in range(n - 1):
	if a[i] > k:
		print(k)
		break
	k += 1
if k == n:
	print(n)


n = int(input())
a = [int(i) for i in input().split()]
p = n * [0]
for i in range(n - 1):
	p[a[i] - 1] = 1
print(p.index(0) + 1)


n = int(input())
a = list(map(int, input().split()))
b = []
for i in range(1, n + 1):
	b.append(0)
for i in a:
	b[i - 1] = 1
print(b.index(0) + 1)


n = int(input())
nums = [int(j) for j in input().split()]
ref = n * [0]
for j in range(n - 1):
	ref[nums[j] - 1] = 1
for j in range(n):
	if ref[j] == 0:
		print(j + 1)
		break


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import Counter
import heapq
from collections import Counter
from bisect import bisect_right
import bisect
n = int(input())
arr = list(map(int, input().split()))
d = Counter(arr)
for i in range(1, n + 1):
	if i not in d:
		print(i)


n = int(input())
arr = map(int, input().split())
sum1 = n * (n + 1) // 2
sum2 = sum(arr)
print(sum1 - sum2)


n = int(input())
l = set(map(int, input().split()))
k = set(range(1, n + 1))
k1 = k - l
print(*k1)


n = int(input())
a = [int(x) for x in input().split()]
used = [0] * n
for x in a:
	used[x - 1] = 1
print(used.index(0) + 1)


a = int(input())
b = sorted(list(map(int, input().split())))
c = list(range(1, a + 1))
b = set(b)
c = set(c)
f = c.difference(b)
f = list(f)
print(f[0])


n = int(input())
l = set([int(x) for x in input().split()])
g = []
for i in range(1, n + 1):
	g.append(i)
g = set(g)
print(*set.difference(g, l))


n = int(input())
num = list(map(int, input().split()))
tot1 = 0
tot2 = 0
for i in range(n):
	tot1 += i + 1
for i in range(n - 1):
	tot2 += num[i]
miss = tot1 - tot2
print(miss)


n = int(input())
s = list(map(int, input().split()))
p = n * (n + 1) // 2
q = sum(s)
a = p - q
print(a)


n = int(input())
a = list(map(int, input().split()))
s = 0
while n > 0:
	s = s + n
	n = n - 1
print(s - sum(a))


n = int(input())
f = 0
d = n * (n + 1) // 2
sum = 0
a = [int(i) for i in input().split()]
for i in range(0, len(a)):
	sum = sum + a[i]
f = d - sum
print(f)


def missing(n, lst):
	return sum(range(1, n + 1)) - sum(lst)
N = int(input())
a = [int(i) for i in input().split()]
print(missing(N, a))