def find_socks(arr):
    socks = {}
    count = 0
    for i in arr:
        if i in socks:
            socks[i] += 1
        else:
            socks[i] = 1
    for i in socks:
        if socks[i] // 2 >= 1:
            count += socks[i] // 2
    return count


n = int(input())
ar = list(map(int, input().rstrip().split()))
print(find_socks(ar))

72027df1351fb26fefa457b9ff23e60e194b69c5
<mask token>

def find_socks(arr):
    socks = {}
    count = 0
    for i in arr:
        if i in socks:
            socks[i] += 1
        else:
            socks[i] = 1
    for i in socks:
        if socks[i] // 2 >= 1:
            count += socks[i] // 2
    return count


<mask token>

def find_socks(arr):
    socks = {}
    count = 0
    for i in arr:
        if i in socks:
            socks[i] += 1
        else:
            socks[i] = 1
    for i in socks:
        if socks[i] // 2 >= 1:
            count += socks[i] // 2
    return count


<mask token>
print(find_socks(ar))

def find_socks(arr):
    socks = {}
    count = 0
    for i in arr:
        if i in socks:
            socks[i] += 1
        else:
            socks[i] = 1
    for i in socks:
        if socks[i] // 2 >= 1:
            count += socks[i] // 2
    return count


n = int(input())
ar = list(map(int, input().rstrip().split()))
print(find_socks(ar))
