#coding: UTF-8 import sys from math import pi from collections import deque from functools import reduce ### defs ### ### main ### N = int(sys.stdin.readline()) abc = map(lambda s:s.split(), sys.stdin.readlines()) abc = map(lambda lst: map(int,lst) ,abc) cnt = [0]*10 for x in abc: for y in x: cnt[y-1]+=1 ans=0 for i in range(10): ans += cnt[i] // 2 cnt[i] -= cnt[i]//2*2 ans += sum(cnt)//4 print(ans)