---
{"category_name":"easy","problem_code":"CHFPLN","problem_name":"Chef In Infinite Plane","problemComponents":{"constraints":"- $1 \\leq T \\leq 10$\n- $1 \\leq N \\leq 2 \\cdot 10^5$\n- $2 \\leq A_i \\leq 10^5$\n","constraintsState":true,"subtasks":"","subtasksState":false,"inputFormat":"- The first line contains a single integer $T$ - the number of test cases. The description of $T$ test cases follows.\n- The first line of each test case contains a single integer $N$.\n- The second line contains $N$ integers $A_1, A_2, \\ldots, A_N$.\n","inputFormatState":true,"outputFormat":"For each test case, print a single line containing one integer — the maximum number of distinct points there can be in the infinite plane.\n","outputFormatState":true,"sampleTestCases":{"0":{"id":1,"input":"2\n6\n2 2 4 4 2 6 \n2\n16 8","output":"4\n2","explanation":"**Test Case 1:** Chef can divide $A_1$ as $(1,1)$, $A_2$ as $(1,1)$, $A_3$ as $(1,3)$, $A_4$ as $(2,2)$, $A_5$ as $(1,1)$, $A_6$ as $(2,4)$. Ignoring duplicates, there are $4$ distinct points, which is the maximum possible.\n\n**Test Case 2:** Chef can divide $A_1$ as $(8,8)$, $A_2$ as $(4,4)$.","isDeleted":false}}},"video_editorial_url":"https://youtu.be/y2Pw4_h6xB0","languages_supported":{"0":"CPP14","1":"C","2":"JAVA","3":"PYTH 3.6","4":"CPP17","5":"PYTH","6":"PYP3","7":"CS2","8":"ADA","9":"PYPY","10":"TEXT","11":"PAS fpc","12":"NODEJS","13":"RUBY","14":"PHP","15":"GO","16":"HASK","17":"TCL","18":"PERL","19":"SCALA","20":"LUA","21":"kotlin","22":"BASH","23":"JS","24":"LISP sbcl","25":"rust","26":"PAS gpc","27":"BF","28":"CLOJ","29":"R","30":"D","31":"CAML","32":"FORT","33":"ASM","34":"swift","35":"FS","36":"WSPC","37":"LISP clisp","38":"SQL","39":"SCM guile","40":"PERL6","41":"ERL","42":"CLPS","43":"ICK","44":"NICE","45":"PRLG","46":"ICON","47":"COB","48":"SCM chicken","49":"PIKE","50":"SCM qobi","51":"ST","52":"SQLQ","53":"NEM"},"max_timelimit":1,"source_sizelimit":50000,"problem_author":"souradeep_adm","problem_tester":"aryanc403","date_added":"9-07-2021","tags":{"0":"cook131","1":"map","2":"simple","3":"souradeep_adm","4":"vichitr"},"problem_difficulty_level":"Simple","best_tag":"","editorial_url":"https://discuss.codechef.com/problems/CHFPLN","time":{"view_start_date":1627492504,"submit_start_date":1627492504,"visible_start_date":1627492504,"end_date":1735669800},"is_direct_submittable":false,"problemDiscussURL":"https://discuss.codechef.com/search?q=CHFPLN","is_proctored":false,"visitedContests":{},"layout":"problem"}
---
### Read problems statements in [Mandarin Chinese](https://www.codechef.com/download/translated/COOK131/mandarin/CHFPLN.pdf), [Russian](https://www.codechef.com/download/translated/COOK131/russian/CHFPLN.pdf), [Vietnamese](https://www.codechef.com/download/translated/COOK131/vietnamese/CHFPLN.pdf) and [Bengali](https://www.codechef.com/download/translated/COOK131/bengali/CHFPLN.pdf) as well.
Chef has an integer sequence $A_1, A_2, \ldots, A_N$. For each index $i$ ($1 \leq i \leq N$), Chef needs to divide $A_i$ into two positive integers $x$ and $y$ such that $x + y = A_i$, then place this as a point $(x, y)$ in the infinite $2$-dimensional coordinate plane. Help Chef to find the maximum number of distinct points that can be put in the plane, if he optimally splits the values $A_i$. Note that Chef can only perform one split for each index.
**Note:** Please use fast input/output methods for this problem.
<aside style='background: #f8f8f8;padding: 10px 15px;'><div>All submissions for this problem are available.</div></aside>