{"raw_statement":[{"iden":"statement","content":"Consider the following expression: $$\\sqrt{a_1} \\pm \\sqrt{a_2} \\pm \\dots \\pm \\sqrt{a_n} = 0\\text{.}$$ Calculate the number of ways to replace each $plus.minus$ with $+$ or $-$ so that it holds true.\n\nThe first line of input contains a single integer $n$ ($2 <= n <= 36$).\n\nSecond line of input contains $n$ integers $a_1, a_2, \\\\dots, a_n$ ($1 <= a_i <= 10^(10^5)$). \n\nOutput a single integer: the answer to the problem.\n\n"},{"iden":"input","content":"The first line of input contains a single integer $n$ ($2 <= n <= 36$).Second line of input contains $n$ integers $a_1, a_2, \\\\dots, a_n$ ($1 <= a_i <= 10^(10^5)$). "},{"iden":"output","content":"Output a single integer: the answer to the problem."},{"iden":"examples","content":"Input3\n2 2 8\nOutput1\nInput4\n4 9 25 49\nOutput0\n"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n \\in \\mathbb{Z} $ with $ 2 \\leq n \\leq 36 $.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive integers, where $ 1 \\leq a_i \\leq 10^{10^5} $ for all $ i $.\n\n**Constraints**  \nNone beyond those specified in definitions.\n\n**Objective**  \nCount the number of sign vectors $ s = (s_1, s_2, \\dots, s_n) \\in \\{+1, -1\\}^n $ such that:  \n$$\n\\sum_{i=1}^n s_i \\sqrt{a_i} = 0\n$$","simple_statement":"Given n square roots √a₁, √a₂, ..., √aₙ, count how many ways to assign + or - to each so that their sum is zero.","has_page_source":false}