1 #include <iostream>
2 #include <cstdio>
3 #include <cstdlib>
4 #include <cmath>
5 #include <cctype>
6 #include <cstring>
7
8 #include <vector>
9 #include <deque>
10 #include <list>
11 #include <map>
12 #include <set>
13 #include <stack>
14 #include <queue>
15 #include <algorithm>
16 #include <string>
17
18
19 #define MAXD 99999999
20 using namespace std;
21
22
23 int rsc[1000+4];
24
25
26
27
28 int main()
29 {
30 int n,i,j,k;
31
32 while(scanf("%d",&n)!=EOF)
33 {
34 if(n==0)
35 break;
36
37
38 for(i=0;i<n;i++)
39 {
40 scanf("%d",&rsc[i]);
41 }
42
43 int sc;
44
45 int num=0;
46
47
48 scanf("%d",&sc);
49
50
51 for(i=0;i<n;i++)
52 {
53 if(sc==rsc[i])
54 num++;
55 }
56
57 cout<<num<<endl;
58 }
59
60
61
62
63
64
65
66 return 0;
67 }