import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); Map<Integer, Integer> m = new HashMap<>(); int n = sc.nextInt(); while (n-- > 0){ int k = sc.nextInt(); if(m.containsKey(k)) m.put(k, m.get(k) + 1); else m.put(k, 1); } int k = sc.nextInt(); if(!m.containsKey(k)) m.put(k, 0); System.out.println(m.get(k)); } }