fn main() {
    input!{
		n: usize,
		a: [usize; n],
	}

	// 1~nの個数を記録
	let mut cnt_a = vec![0; n+1];
	for &aa in &a {
		cnt_a[aa] += 1;
	}
	
	// 各値について、2で割った個数(切り捨て)を数える
	let mut cnt = 0;
	for &x in &cnt_a {
		cnt += x / 2;
	}
	println!("{}", cnt);
}
// const MOD17: usize = 1000000007;
// const MOD93: usize = 998244353;
// const INF: usize = 1 << 60;
// let dx = vec![!0, 0, 1, 0]; // 上左下右
// let dy = vec![0, !0, 0, 1]; // 上左下右
// let d = vec!{(!0, 0), (0, !0), (1, 0), (0, 1)}; // 上左下右

#[allow(unused)]
use proconio::{input, marker::Chars, marker::Usize1};

#[allow(unused)]
use std::{
	mem::swap,
	cmp::min, cmp::max,
	cmp::Reverse,
	collections::HashSet, collections::BTreeSet,
	collections::HashMap, collections::BTreeMap,
	collections::BinaryHeap,
	collections::VecDeque,
	iter::FromIterator,
};