def main(): d = {} ans = 0 N = int(input()) for i in range(N): l = map(int, input().split()) for e in l: d[e] = d.get(e, 0) + 1 #print(d) for k, v in d.items(): tmp = v while tmp >= 2: tmp = tmp - 2 d[k] = d[k] - 2 ans += 1 #print(d) #print(ans) sum_values = 0 for k, v in d.items(): sum_values += v ans = ans + sum_values // 5 print(ans) if __name__ == '__main__': main()