#!/bin/python3

import math
import os
import random
import re
import sys

# Complete the sockMerchant function below.
def sockMerchant(n, ar):
    st = dict()
    add = 0
    for i in ar:
        if i not in st:
            st[i]=1
        else:
            st[i] = st[i]+1
    for j in st:
        add = add+(st[j]//2)
    return add

    

if __name__ == '__main__':
    fptr = open(os.environ['OUTPUT_PATH'], 'w')

    n = int(input())

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

    result = sockMerchant(n, ar)

    fptr.write(str(result) + '\n')

    fptr.close()
