int main() {
    int n, count = 0;
    scanf("%d", &n);
    int m[n + 1];
    for (int i = 0; i < n + 1; i++) {
        scanf("%d ", &m[i]);
    }
    for (int j = 0; j < n; j++) {
        if (m[j] == m[n])  //判断当前数是否与查找数相等
            count++;
    }
    printf("%d", count);
    return 0;
}