N = int(input()) item_cnt = [0]*10 for _ in range(N): item = list(map(int,input().split())) for i in item: item_cnt[i-1] += 1 ans = 0 cnt = 0 for i in range(10): ans += item_cnt[i]//2 if item_cnt[i]%2: cnt += 1 print(ans+cnt//4)