The product of $46$ integers is $1$. Which of the following cannot be the sum of these $46$ integers? I am solving a problem about integers.
The product of $46$ integers is $1$. Which of the following cannot be the sum of these $46$ integers?
$A.38$

$B.6$

$C.0$

$D.-14$
To solve this, I think, we can use these equations below since the only way to get a product of 1 with integers which sum is 46, is that
$(-1)^{2n}$ $×$ $(1)^{46-2n} = 1$, $n≥ 0$
and
$(-1)x + (1)y = z$,
where $x$ is the number of times (-1) was used,
$y$ is the number of times of (1) was used, $z∈\{-14,0,6,38\}$
I am not sure if my ideas are correct and can be connected.
Any comments and/or suggestions will be much appreciated. Thank you!
 A: If the product of 46 integers are $1$, then the 46 integers are either $-1$ or $1$. Since they multiply to $1$, there is an even number of integers whose value is $-1$. Therefore their sums could be:
$$1\times46+-1\times0=1\text{ sum is 46}$$
$$1\times44+-1\times2=1\text{ sum is 42}$$
$$1\times42+-1\times4=1\text{ sum is 38}$$
$$...$$
$$1\times4+-1\times2=42\text{ sum is -38}$$
$$1\times2+-1\times2=44\text{ sum is -42}$$
$$1\times0+-1\times2=46\text{ sum is -46}$$
Modulo 4, it is clear the sums can only take one value. I leave the rest to you if you decide to also consider this method to deduce the answer (which is fundamentally the exact same as your's, though rephrased).
A: Yes, you are correct so far. Your first equation implies that in the second equation you have $x+y=46$, and $x$ and $y$ are both even. So what does this tell you about the possible values of $z=y-x$? (You could just try each of the four alternatives and see if you can find suitable $x,y$.)
A: Suppose $a_1,\ldots,a_n$ are integers such that $a_1 \cdots a_n=1$. Then each $a_i \in \{+1,-1\}$. If $k$ of these $n$ integers are $-1$, then $n-k$ are $1$, and their sum is $n-2k$. Moreover, $k$ is even (since the product is $+1$), so that with $k=2\ell$ we have the sum $n-2k=n-4\ell$, with $0 \le k \le n$ and $0 \le \ell \le \left\lfloor\frac{n}{2}\right\rfloor$.
Conversely, any integer of the form $n-4\ell$ is attained by selecting $2\ell$ of the $a_i$'s equal to $-1$'s.
In particular, when $n=46$, the attainable sums are in $\{46-4k: 0 \le k \le 23\}$. Therefore, the only non attainable sum is $0$. $\blacksquare$
