{"problem":{"name":"Socks","description":{"content":"You have $N$ socks. The color of the $i$\\-th sock is $A_i$. You want to perform the following operation as many times as possible. How many times can it be performed at most? *   Choose two same-colo","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":4000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc295_c"},"statements":[{"statement_type":"Markdown","content":"You have $N$ socks. The color of the $i$\\-th sock is $A_i$.\nYou want to perform the following operation as many times as possible. How many times can it be performed at most?\n\n*   Choose two same-colored socks that are not paired yet, and pair them.\n\n## Constraints\n\n*   $1\\leq N \\leq 5\\times 10^5$\n*   $1\\leq A_i \\leq 10^9$\n*   All values in the input are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc295_c","tags":[],"sample_group":[["6\n4 1 7 4 1 4","2\n\nYou can do the operation twice as follows.\n\n*   Choose two socks with the color $1$ and pair them.\n*   Choose two socks with the color $4$ and pair them.\n\nThen, you will be left with one sock with the color $4$ and another with the color $7$, so you can no longer do the operation. There is no way to do the operation three or more times, so you should print $2$."],["1\n158260522","0"],["10\n295 2 29 295 29 2 29 295 2 29","4"]],"created_at":"2026-03-03 11:01:14"}}