{"problem":{"name":"E. Collection","description":{"content":"Alan recently started collecting the cards of the well known \"Famous Computer Scientists\" card game by the ACM. As buying cards is starting to get expensive, he would like to start trading. To do this","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":65536},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10159E"},"statements":[{"statement_type":"Markdown","content":"Alan recently started collecting the cards of the well known \"Famous Computer Scientists\" card game by the ACM. As buying cards is starting to get expensive, he would like to start trading. To do this, he needs to know the number of duplicate cards in his collection. Write a program to help him calculate this number. \n\nThe first line contains a single integer n, the number of cards in Alan's collection. The second line contains n integers ci, where ci is the id of the i-th card. It holds that 1 ≤ n ≤ 200'000 and 0 ≤ ci ≤ 109. \n\nPrint a single integer denoting the number of duplicates, that is the number of cards he can safely trade whilst still having the same number of unique cards.\n\n## Input\n\nThe first line contains a single integer n, the number of cards in Alan's collection. The second line contains n integers ci, where ci is the id of the i-th card. It holds that 1 ≤ n ≤ 200'000 and 0 ≤ ci ≤ 109. \n\n## Output\n\nPrint a single integer denoting the number of duplicates, that is the number of cards he can safely trade whilst still having the same number of unique cards.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the number of cards in Alan's collection.  \nLet $ C = (c_1, c_2, \\dots, c_n) $ be a sequence of integers representing card IDs, where $ c_i \\in \\mathbb{Z} $ and $ 0 \\leq c_i \\leq 10^9 $.\n\n**Constraints**  \n1. $ 1 \\leq n \\leq 200{,}000 $  \n2. $ 0 \\leq c_i \\leq 10^9 $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nCompute the number of duplicate cards, defined as:  \n$$\nn - |\\{c_1, c_2, \\dots, c_n\\}|\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10159E","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}