use std::collections::HashMap; use proconio::{input, marker::Chars}; fn main() { input! { a: [i32], }; let mut cnt: HashMap = HashMap::new(); a.iter().for_each(|ai| { cnt.entry(*ai) .and_modify(|counter| *counter += 1) .or_insert(1); }); let ans: i32 = cnt.values().map(|x| x / 2).sum(); println!("{}", ans); }