A very brave explorer Petya once decided to explore Paris catacombs. Since Petya is not really experienced, his exploration is just walking through the catacombs.

Catacombs consist of several rooms and bidirectional passages between some pairs of them. Some passages can connect a room to itself and since the passages are built on different depths they do not intersect each other. Every minute Petya arbitrary chooses a passage from the room he is currently in and then reaches the room on the other end of the passage in exactly one minute. When he enters a room at minute i, he makes a note in his logbook with number t_{i}:   If Petya has visited this room before, he writes down the minute he was in this room last time;  Otherwise, Petya writes down an arbitrary non-negative integer strictly less than current minute i. 

Initially, Petya was in one of the rooms at minute 0, he didn't write down number t_0.

At some point during his wandering Petya got tired, threw out his logbook and went home. Vasya found his logbook and now he is curious: what is the minimum possible number of rooms in Paris catacombs according to Petya's logbook?


-----Input-----

The first line contains a single integer n (1 ≤ n ≤ 2·10^5) — then number of notes in Petya's logbook.

The second line contains n non-negative integers t_1, t_2, ..., t_{n} (0 ≤ t_{i} < i) — notes in the logbook.


-----Output-----

In the only line print a single integer — the minimum possible number of rooms in Paris catacombs.


-----Examples-----
Input
2
0 0

Output
2

Input
5
0 1 0 1 3

Output
3



-----Note-----

In the first sample, sequence of rooms Petya visited could be, for example 1 → 1 → 2, 1 → 2 → 1 or 1 → 2 → 3. The minimum possible number of rooms is 2.

In the second sample, the sequence could be 1 → 2 → 3 → 1 → 2 → 1.

Difficulty: MEDIUM

Starter code:

Solutions:
N = int(input())
texts = [0] * N
texts = input().split()
ends = set()
ends.add(0)
for i in range(N):
	if int(texts[i]) in ends:
		ends.remove(int(texts[i]))
	ends.add(i + 1)
print(len(ends))


g = input()
s = input().split()
print(1 + len(s) - len(set(s)))


n = int(input())
l = list(map(int, input().split()))
x = len(set(l))
print(n + 1 - x)


n = int(input())
log = [int(x) for x in input().split()]
log.sort()
nr = 1
for i in range(n - 1):
	if log[i] == log[i + 1]:
		nr += 1
print(nr)


n = int(input())
a = list(map(int, input().split()))
useds = [0 for i in range(200017)]
useds[0] = 1
ans = 1
for i in range(n):
	if useds[a[i]] > 0:
		useds[a[i]] -= 1
	else:
		ans += 1
	useds[i + 1] += 1
print(ans)


def main():
	n = int(input())
	a = [0]
	a += list(map(int, input().split()))
	p = [0] * 200001
	p[1] = 0
	k = [-1] * 200001
	k[0] = 1
	ans = 1
	cnt = 1
	for i in range(1, n + 1):
		if i == 1:
			if a[i] == 1:
				cnt += 1
				k[i] = cnt
				p[cnt] = i
				ans += 1
			else:
				k[i] = k[a[a[i]]]
				p[k[i]] = i
		elif p[k[a[i]]] != a[i]:
			cnt += 1
			k[i] = cnt
			p[cnt] = i
			ans += 1
		else:
			k[i] = k[a[i]]
			p[k[i]] = i
	print(ans)
main()


n = int(input())
a = list(map(int, input().split()))
now_time = 1
count_v = 1
last_time = [0 for i in range(2 * 10 ** 5 + 10)]
last_time[0] = 1
for i in range(n):
	if last_time[a[i]] > 0:
		last_time[a[i]] -= 1
	else:
		count_v += 1
	last_time[now_time] += 1
	now_time += 1
print(count_v)


n = int(input())
inp = list(map(int, input().split()))
arr = [0]
count = 1
time = 1
dict = {0: 0}
for i in inp:
	if dict[arr[i]] != i:
		dict[count] = time
		arr.append(count)
		count += 1
	else:
		dict[arr[i]] = time
		arr.append(arr[i])
	time += 1
print(count)


import math
from decimal import Decimal

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)
(n, a) = na()
print(n - len(set(a)) + 1)


n = int(input())
minutesUsed = [0 for _ in range(n)]
count = 1
for v in [int(k) for k in input().split(' ') if k]:
	if minutesUsed[v]:
		count += 1
	else:
		minutesUsed[v] = 1
print(count)


y = int(input())
x = list(map(int, input().split()))
print(len(x) + 1 - len(set(x)))


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


n = int(input())
notes = [int(x) for x in input().split()]
greatest_cave = 1
visits = {0: 1}
for (time, curr) in enumerate(notes, start=1):
	if curr in visits and visits[curr] != -1:
		visits[time] = visits[curr]
		visits[curr] = -1
	else:
		greatest_cave += 1
		visits[time] = greatest_cave
print(greatest_cave)


n = int(input())
s = {0}
j = 0
for i in list(map(int, input().split())):
	j += 1
	if i in s:
		s.discard(i)
		s.add(j)
	else:
		s.add(j)
print(len(s))


n = int(input())
a = list(map(int, input().split()))
a1 = [0] * 1000000
k = 0
for i in a:
	if a1[i] == 0:
		k += 1
		a1[i] = 1
print(n - k + 1)


n = int(input())
time = list(map(int, input().split()))
pos = {}
las_pos = {}
pos[0] = 1
las_pos[1] = 0
rooms = 1
for i in range(n):
	if las_pos[pos[time[i]]] == time[i]:
		las_pos[pos[time[i]]] = i + 1
		pos[i + 1] = pos[time[i]]
	else:
		rooms += 1
		pos[i + 1] = rooms
		las_pos[rooms] = i + 1
print(rooms)


n = int(input())
t = [int(x) for x in input().split()]
ans = 0
istime = [0] * (2 * 10 ** 5 + 13)
istime[0] = 1
for i in range(n):
	if istime[t[i]] > 0:
		istime[t[i]] -= 1
	else:
		ans += 1
	istime[i + 1] += 1
print(ans + 1)


input()
rooms = set([0])
i = 0
for a in input().split():
	a = int(a)
	try:
		rooms.remove(a)
	except Exception as e:
		pass
	i += 1
	rooms.add(i)
print(len(rooms))


n = int(input())
dict = {}
arr = list(map(int, input().split()))
room = 0
time = 1
for i in arr:
	if i in dict and dict[i] != -1:
		dict[time] = dict[i]
		dict[i] = -1
	else:
		room += 1
		dict[time] = room
	time += 1
print(room)


n = int(input())
l = list(map(int, input().split()))
d = {}
s = set()
s.add(0)
d[0] = 1
ans = 1
for i in range(n):
	if l[i] in s:
		d[i + 1] = d[l[i]]
		s.remove(l[i])
		s.add(i + 1)
	else:
		s.add(i + 1)
		ans += 1
		d[i + 1] = ans
print(ans)


import sys

def ria():
	return [int(x) for x in input().split()]
n = int(input())
a = ria()
a = [0] + a
time = [-1] * (n + 1)
time[0] = 0
tf = 0
for i in range(1, n + 1, 1):
	if time[a[i]] != -1:
		time[i] = time[a[i]]
		time[a[i]] = -1
	else:
		tf += 1
		time[i] = tf
tf += 1
print(tf)


i = int(input())
ctc = [0] + list(map(int, input().split()))
nm = 1
ptor = {0: 1}
for i in range(1, len(ctc)):
	if ctc[i] in list(ptor.keys()):
		ptor[i] = ptor[ctc[i]]
		del ptor[ctc[i]]
	else:
		nm += 1
		ptor[i] = nm
print(nm)


class Petya_sNotes(object):

	def __init__(self, nVisits, notesContent):
		self.nVisits = nVisits
		self.notesContent = notesContent

	def min_nRoomsVisited(self):
		min_nRooms = 1
		recordOfLatestMinutes = {x for x in range(self.nVisits)}
		for iMinute in range(self.nVisits):
			note = int(self.notesContent[iMinute])
			if note not in recordOfLatestMinutes:
				min_nRooms += 1
			else:
				recordOfLatestMinutes.remove(note)
		return min_nRooms
print(Petya_sNotes(int(input()), input().split()).min_nRoomsVisited())


class Petya_sNotes(object):

	def __init__(self, nVisits, notesContent):
		self.nVisits = nVisits
		self.notesContent = notesContent

	def min_nRoomsVisited(self):
		return self.nVisits + 1 - len(set(self.notesContent))
print(Petya_sNotes(int(input()), input().split()).min_nRoomsVisited())


n = int(input())
t = [int(x) for x in input().split()]
visited = [False] * n
count = 0
for i in range(n - 1, -1, -1):
	if visited[i]:
		continue
	curr_index = i
	while True:
		visited[curr_index] = True
		if t[curr_index] == 0:
			count += 1
			break
		if visited[t[curr_index] - 1]:
			count += 1
			break
		curr_index = t[curr_index] - 1
print(count)


n = int(input())
l = list(map(int, input().split()))
w = set(l)
print(n - len(w) + 1)


a = [1]
c = {1: 0}
n = int(input())
b = list(map(int, input().split()))
j = 1
for i in range(n):
	if b[i] == 0:
		a.append(j)
		c[j] = i + 1
	elif b[i] == c[a[b[i]]]:
		a.append(a[b[i]])
		c[a[b[i]]] = i + 1
		j -= 1
	else:
		a.append(j)
		c[j] = i + 1
	j += 1
print(j - 1)


n = int(input())
arr = list(map(int, input().split()))
arr.sort()
cnt_total = 0
cnt_tmp = 0
for i in range(1, n):
	if arr[i] == arr[i - 1]:
		cnt_total += 1
print(cnt_total + 1)


n = int(input())
arr = list(map(int, input().split()))
ans = 1
zapis = dict()
cur = 0
zapis[0] = 1
for time in arr:
	cur += 1
	ind = None
	if zapis[time] is not None:
		(zapis[time], zapis[cur]) = (None, zapis[time])
		continue
	ans += 1
	zapis[cur] = ans
print(ans)


am = int(input())
arr = list(map(int, input().split()))
was = [False] * am
t = 0
for i in range(am):
	if arr[i] == 0:
		t += 1
		was[i] = True
		continue
	if was[arr[i] - 1]:
		was[arr[i] - 1] = False
		was[i] = True
	else:
		was[i] = True
		t += 1
print(t)


min_nRooms = 1
recordOfLatestMinutes = {0}
(nVisits, notesContent) = (int(input()), input().split())
for iMinute in range(nVisits):
	note = int(notesContent[iMinute])
	if note not in recordOfLatestMinutes:
		min_nRooms += 1
	else:
		recordOfLatestMinutes.remove(note)
	recordOfLatestMinutes.add(iMinute + 1)
print(min_nRooms)


n = int(input())
a = list(map(int, input().split()))
ans = 0
times = set()
curtime = 0
for i in a:
	curtime += 1
	if i in times:
		times.remove(i)
		times.add(curtime)
	else:
		ans += 1
		times.add(curtime)
print(ans)


n = int(input())
l = [int(i) for i in input().split(' ')]
cnt = [0 for i in range(n)]
result = 1
for i in l:
	cnt[i] += 1
for i in range(n):
	result += max(0, cnt[i] - 1)
print(result)


def main():
	n = int(input())
	times = list(map(int, input().split()))
	mntm = set()
	mntm.add(0)
	ans = 1
	for t in range(n):
		if times[t] in mntm:
			mntm.discard(times[t])
			mntm.add(t + 1)
		else:
			ans += 1
			mntm.add(t + 1)
	print(ans)
main()


n = int(input())
a = list(map(int, input().split()))
time = [-1] * (n + 1)
time[0] = 1
count = 1
for i in range(n):
	cur_time = i + 1
	if time[a[i]] != -1:
		(time[a[i]], time[cur_time]) = (-1, time[a[i]])
	else:
		count += 1
		time[cur_time] = count
print(count)


import sys
input()
k = list(map(int, input().split()))
l = []
s = [0 for i in range(200001)]
t = 1
for i in k:
	if s[i] == 1:
		s[i] = 0
	s[t] = 1
	t += 1
print(sum(s))


(n, data) = (int(input()), list(map(int, input().split())))
time = [0] + [-100] * (3 * 10 ** 5)
rooms = [0]
for i in range(1, n + 1):
	if time[data[i - 1]] != -100 and rooms[time[data[i - 1]]] == data[i - 1]:
		rooms[time[data[i - 1]]] = i
		time[i] = time[data[i - 1]]
	else:
		rooms.append(i)
		time[i] = len(rooms) - 1
print(len(rooms))


def main():
	n = int(input())
	p = set()
	t = list(map(int, input().split()))
	p.add(1)
	for i in range(1, n):
		if t[i] == 0:
			p.add(i + 1)
			continue
		if t[i] in p:
			p.remove(t[i])
			p.add(i + 1)
		else:
			p.add(i + 1)
	print(len(p))
main()


from sys import stdin
input = lambda : stdin.readline().strip()
from math import ceil, sqrt, factorial, gcd
n = int(input())
l = list(map(int, input().split()))
print(n + 1 - len(set(l)))


n = int(input())
l = list(map(int, input().split()))
a = [0 for i in range(200001)]
for x in l:
	a[x] = 1
for i in range(1, 200001):
	n -= a[i]
print(n)


n = int(input())
A = list(map(int, input().split()))
D = {}
for i in range(n):
	D[A[i]] = D.get(A[i], -1) + 1
a = sum(D.values()) + 1
print(a)


import sys
import math
import heapq
import bisect
from collections import Counter
from collections import defaultdict
from io import BytesIO, IOBase
import string

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		import os
		self.os = os
		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
		self.BUFSIZE = 8192

	def read(self):
		while True:
			b = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.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 = self.os.read(self._fd, max(self.os.fstat(self._fd).st_size, self.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:
			self.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')

def get_int():
	return int(input())

def get_ints():
	return list(map(int, input().split(' ')))

def get_int_grid(n):
	return [get_ints() for _ in range(n)]

def get_str():
	return input().split(' ')

def yes_no(b):
	if b:
		return 'YES'
	else:
		return 'NO'

def binary_search(good, left, right, delta=1, right_true=False):
	limits = [left, right]
	while limits[1] - limits[0] > delta:
		if delta == 1:
			mid = sum(limits) // 2
		else:
			mid = sum(limits) / 2
		if good(mid):
			limits[int(right_true)] = mid
		else:
			limits[int(~right_true)] = mid
	if good(limits[int(right_true)]):
		return limits[int(right_true)]
	else:
		return False

def prefix_sums(a, drop_zero=False):
	p = [0]
	for x in a:
		p.append(p[-1] + x)
	if drop_zero:
		return p[1:]
	else:
		return p

def prefix_mins(a, drop_zero=False):
	p = [float('inf')]
	for x in a:
		p.append(min(p[-1], x))
	if drop_zero:
		return p[1:]
	else:
		return p

def solve_c():
	n = get_int()
	t = get_ints()
	return 1 + sum([v - 1 for v in Counter(t).values()])
print(solve_c())


from sys import stdin, stdout, setrecursionlimit
import heapq
from math import gcd, ceil, sqrt
from collections import Counter, deque
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations
ii1 = lambda : int(stdin.readline().strip())
is1 = lambda : stdin.readline().strip()
iia = lambda : list(map(int, stdin.readline().strip().split()))
isa = lambda : stdin.readline().strip().split()
setrecursionlimit(100000)
mod = 1000000007
n = ii1()
arr = iia()
print(n - len(set(arr)) + 1)


from sys import stdin as fin
n = int(fin.readline()) + 1
t = [0]
t += list(map(int, fin.readline().split()))
(k, tc, ver) = (1, [None] * n, [None] * n)
tc[0] = 1
tc[1] = 1
ver[1] = 1
for i in range(2, n):
	pv = tc[t[i]]
	if ver[pv] == t[i]:
		tc[i] = pv
		ver[pv] = i
	else:
		k += 1
		tc[i] = k
		ver[k] = i
print(k)


n = int(input())
a = list(map(int, input().split()))
b = [-1]
c = [-1] * (n + 1)
c[0] = 1
cnt = 1
for i in a:
	if cnt == 1 or b[c[i]] != i:
		b.append(cnt)
		c[cnt] = len(b) - 1
		cnt += 1
	else:
		b[c[i]] = cnt
		c[cnt] = c[i]
		cnt += 1
print(len(b) - 1)


n = int(input())
a = [int(i) for i in input().split()]
vis = [False] * n
ans = 0
for i in range(n):
	if a[i] == 0:
		ans += 1
		vis[0] = True
	elif vis[a[i]]:
		ans += 1
	else:
		vis[a[i]] = True
print(ans)


def getMinimum(arr, n):
	times = [None for i in range(0, n + 1)]
	rooms = [None for i in range(0, n + 1)]
	currentRoom = 0
	times[0] = currentRoom
	rooms[currentRoom] = 0
	t = 1
	total = 1
	currentRoom += 1
	for i in range(0, n):
		if arr[i] >= t:
			t += 1
		else:
			if times[arr[i]] != None:
				curRoom = times[arr[i]]
				lastTime = rooms[curRoom]
				if arr[i] != lastTime:
					total += 1
					rooms[currentRoom] = t
					times[t] = currentRoom
					currentRoom += 1
				else:
					rooms[curRoom] = t
					times[t] = curRoom
			else:
				rooms[currentRoom] = t
				times[t] = currentRoom
				currentRoom += 1
				total += 1
			t += 1
	return total
n = int(input())
arr = list(map(int, input().split()))
print(getMinimum(arr, n))


n = int(input())
mas = list(map(int, input().split()))
dist = set([0])
res = 1
for (i, e) in enumerate(mas):
	time = i + 1
	if e in dist:
		dist.remove(e)
	else:
		res += 1
	dist.add(time)
print(res)


from sys import stdin, stdout
n = int(stdin.readline())
a = [int(x) for x in stdin.readline().split()]
l = len(a)
b = len(set(a))
print(l - b + 1)


n = int(input())
t = list(map(int, input().split()))
visited = [True] * n
for time in t:
	visited[time] = False
print(sum(visited) + 1)


n = int(input())
a = list(map(int, input().split()))
b = [0] * (n + 1)
res = 1
b[1] = 1
for i in range(2, n + 1):
	if b[a[i - 1]] == 0:
		b[i] = 1
		res += 1
	else:
		b[i] = 1
		b[a[i - 1]] = 0
print(res)


n = int(input())
t = list(map(int, input().split()))
tcopy = t[::-1]
tbool = [False] * len(t)
ans = 0
for i in range(len(t)):
	if not tbool[len(t) - i - 1]:
		ans += 1
		j = len(t) - i - 1
		while not tbool[j]:
			tbool[j] = True
			j = t[j] - 1
			if j < 0:
				break
		tbool[len(t) - i - 1] = True
print(ans)


def main():
	read = lambda : list(map(int, input().split()))
	n = read()[0]
	l = read()
	ans = 0
	lv = 0
	t = 0
	was = [-1] * 300000
	for v in l:
		t += 1
		if was[v] != -1:
			was[t] = was[v]
			was[v] = -1
		else:
			ans += 1
			was[t] = v
	print(ans)
main()


input()
t = 0
time = {t}
for q in input().split():
	a = int(q)
	t += 1
	if a in time:
		time.remove(a)
	time.add(t)
print(len(time))


n = int(input())
a = list(map(int, input().split()))
y = set()
y.add(0)
flag = 0
for i in range(len(a)):
	if {a[i]} <= y:
		y.discard(a[i])
		y.add(i + 1)
	else:
		flag += 1
		y.add(i + 1)
print(flag + 1)


n = int(input())
a = list(map(int, input().split()))
Time = [[] for i in range(n + 1)]
time = 1
NOT_USED = [True] * (n + 1)
ans = 0
for i in range(len(a)):
	if Time[a[i]] != [] and a[i] != 0:
		if NOT_USED[Time[a[i]][0]] == True:
			ans += 1
			NOT_USED[Time[a[i]][0]] = False
		(Time[a[i]], Time[time]) = (Time[a[i]][1:], [Time[a[i]][0]] + Time[time])
		time += 1
	else:
		ans += 1
		NOT_USED[time] = False
		Time[time] = [time] + Time[time]
		time += 1
print(ans)


n = int(input())
t = list(map(int, input().split()))
vis = [False] * n
c = 1
for i in t:
	if not vis[i]:
		vis[i] = True
	else:
		c += 1
print(c)


n = int(input())
a = list(map(int, input().split()))
z = [-1] * n
s = 0
for i in range(n):
	if z[n - 1 - i] != 1:
		if a[n - 1 - i] != 0:
			z[a[n - 1 - i] - 1] = 1
			s += 1
		else:
			s += 1
	elif a[n - 1 - i] != 0:
		z[a[n - 1 - i] - 1] = 1
print(s)


import math
import sys
from collections import defaultdict
from collections import Counter
import bisect
input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
ilele = lambda : map(int, input().split())
alele = lambda : list(map(int, input().split()))

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]
INF = 10 ** 18
MOD = 10 ** 9 + 7
(N,) = ilele()
A = alele()
C = Counter(A)
tot = 1
for i in C.values():
	tot += max(0, i - 1)
print(tot)


n = int(input())
a = list(map(int, input().split()))
di = {0: 0}
k = 1
q = 1
for i in a:
	if i in di:
		del di[i]
	else:
		q += 1
	di[k] = i
	k += 1
print(q)


n = int(input())
a = [int(x) for x in input().split()]
print(1 + len(a) - len(set(a)))


n = int(input())
a = list(map(int, input().split()))
print(1 + len(a) - len(set(a)))


n = int(input())
list1 = list(map(int, input().split()))
time = [0] * (n + 1)
time[0] = 1
ans = 1
for i in range(n):
	if time[list1[i]] == 1:
		time[i + 1] = 1
		time[list1[i]] = 0
	else:
		ans += 1
		time[i + 1] = 1
print(ans)


n = int(input())
lst = input().split()
d = {}
for i in lst:
	if i not in d:
		d[i] = 1
	else:
		d[i] += 1
cnt = 0
for item in d:
	cnt += max(0, d[item] - 1)
print(cnt + 1)


n = int(input())
kat = [int(s) for s in input().split()]
acc = 1
kom = set()
for (t, k) in enumerate(kat):
	if k in kom:
		acc += 1
	else:
		kom.add(k)
print(acc)


n = int(input())
arr = list(map(int, input().split()))
count = 1
p = set()
p.add(0)
for i in range(n):
	if arr[i] in p:
		p.remove(arr[i])
	else:
		count += 1
	p.add(i + 1)
print(count)


n = int(input())
m = list(map(int, input().split(' ')))
s = set()
s.add(1)
for i in range(1, len(m)):
	try:
		s.remove(m[i])
		s.add(i + 1)
	except:
		s.add(i + 1)
print(len(s))


n = int(input())
a = [int(i) for i in input().split()]
d = {0: 0}
cr = 0
total = 0
time = 0
for e in a:
	time += 1
	if e in d and d[e] == cr:
		d[time] = cr
		del d[e]
	elif e not in d:
		total += 1
		cr = total
		d[time] = cr
	elif e in d and d[e] != cr:
		cr = d[e]
		d[time] = cr
		del d[e]
print(total + 1)


import fractions
import math
n = int(input())
t = list(map(int, input().split(' ')))
a = set(t)
print(n + 1 - len(a))


n = int(input())
tl = [0] + list(map(int, input().split()))
ll = list(range(n + 1))
cnt = 1
for (m, t) in enumerate(tl):
	if ll[t] > t:
		ll[m] = m
		cnt += 1
	else:
		ll[t] = m
print(cnt)


c = int(input())
a = list(map(int, input().split()))
res = 0
b = []
for i in range(len(a)):
	b.append(False)
for i in range(len(a)):
	k = len(a) - i - 1
	m = 0
	while b[k] == False:
		b[k] = True
		k = a[k] - 1
		m = 1
		if k == -1:
			break
	if m == 1:
		res = res + 1
print(res)


n = int(input())
data = list(map(int, input().split()))
d = [False] * (n + 4)
d[0] = True
res = 1
for i in range(n):
	if d[data[i]]:
		d[data[i]] = False
		d[i + 1] = True
	else:
		d[i + 1] = True
		res += 1
print(res)


n = int(input())
k = [int(i) for i in input().split()]
w = 1
a = [0 for i in range(n + 1)]
for i in k:
	if a[i] == 0:
		a[i] = 1
	else:
		w += 1
print(w)


n = int(input())
a = list(map(int, input().split()))
mn = set()
mn.add(0)
k = 1
for i in range(n):
	if a[i] in mn:
		mn -= {a[i]}
		mn.add(i + 1)
	else:
		k += 1
		mn.add(i + 1)
print(k)


_ = input()
t = [int(s) for s in input().split()]
p = [False] * len(t)
for (i, _) in enumerate(t):
	r = t[i] - 1
	if r >= 0:
		p[r] = True
print(p.count(False))


n = int(input())
a = [int(x) for x in input().split()]
time = 0
root = {0}
for t in a:
	time += 1
	if t in root:
		root.remove(t)
	root.add(time)
print(len(root))


from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def solve(adj, colors, n):
	pass
n = iinput()
a = rlinput()
d = dict()
ans = 1
for i in a:
	if i in d:
		ans += 1
	d[i] = 0
print(ans)


class Petya_sNotes(object):

	def __init__(self, nVisits, notesContent):
		self.nVisits = nVisits
		self.notesContent = notesContent

	def min_nRoomsVisited(self):
		min_nRooms = 1
		recordOfLatestMinutes = set()
		for iMinute in range(self.nVisits):
			note = int(self.notesContent[iMinute])
			if note in recordOfLatestMinutes:
				min_nRooms += 1
			else:
				recordOfLatestMinutes.add(note)
		return min_nRooms
print(Petya_sNotes(int(input()), input().split()).min_nRoomsVisited())


n = int(input())
A = list(map(int, input().split()))
count = 1
B = []
for q in range(n):
	if A[A[q]] == -1:
		count = count + 1
	else:
		A[A[q]] = -1
print(count)


n = int(input())
a = list(map(int, input().split()))
t = set()
c = 0
for i in range(n - 1, -1, -1):
	if i not in t:
		c += 1
	t |= {a[i] - 1}
print(c)


def main():
	(n, pool, res) = (int(input()), {0}, 1)
	for (i, t) in enumerate(map(int, input().split()), 1):
		if t in pool:
			pool.remove(t)
		else:
			res += 1
		pool.add(i)
	print(res)
main()


n = int(input())
t = list(map(int, input().split()))
rt = set()
r = 1
rt.add(0)
for i in range(1, n):
	if t[i] in rt:
		r += 1
	else:
		rt.add(t[i])
print(r, end='')


n = int(input())
a = list(map(int, input().split()))
last = [-1] * (n + 2)
last[1] = 0
hod = [-1] * (n + 1)
hod[0] = 1
k = 1
o = 1
for i in a:
	if i == last[hod[i]]:
		last[hod[i]] = k
		hod[k] = hod[i]
	else:
		o += 1
		last[o] = k
		hod[k] = o
	k += 1
print(o)


n = int(input())
a = [int(x) for x in input().split()]
q = set(a)
k = len(q)
r = len(a)
sum1 = 0
for i in range(n):
	if a[i] == 0:
		sum1 += 1
	elif a[a[i] - 1] != -10:
		a[a[i] - 1] = -10
	else:
		sum1 += 1
print(sum1)