while True:
    try:
        n = int(input())
        sco = list(map(int, input().split(" ")))
        x = int(input())
        ct = 0
        for i in range(n):
            if x == sco[i]:
                ct += 1
        print(ct)
    except:
        break