1 #include<iostream>
2 #include<cstdio>
3 using namespace std;
4 int a[10000];
5 int b[10000];
6 int main()
7 {
8 int n,z;
9 cin>>n;
10 for(int i=1;i<=n;i++)
11 {
12 cin>>z;
13 a[z]=1;
14 while(z!=0)
15 {
16 cin>>z;
17 a[z]=1;
18 }
19 }
20 int tot=0;
21 for(int i=1;i<=n;i++)
22 {
23 if(a[i]==0)
24 {
25 tot++;
26 }
27 }
28 cout<<tot;
29 return 0;
30 }