import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Map<Integer,Integer> mp = new HashMap<Integer,Integer>();
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        while (n-- > 0) { // 注意 while 处理多个 case
            int a = in.nextInt();
            mp.put(a, mp.getOrDefault(a, 0) + 1);
        }
        int q = in.nextInt();
        System.out.print(mp.getOrDefault(q, 0));
    }
}