#include <cstdio>
#include <algorithm>
using namespace std;
const int N = 2e5 + 10;
int a[N];
int main()
{
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) scanf("%d", a + i);
	sort(a, a + n);
	printf("%d", n - (unique(a, a + n) - a));
	return 0;
}