Answer: a maximum of n-1 can be freely selected
Explanation:
The fact that we already know the mean means that, if we have n values:
X = (x₁ + x₂ + ....... + xₙ)/n
where X is known and n is known.
Now, suppose we can assign n freely therms: this is not the case, because if X is different than 0, we could assign the n values equal to zero and the equality would be false.
Now suppose we can assign n-1 values freely, then we would have the equation:
X = (x₁ + x₂ +....)/n + xₙ/n
where the term (x₁ + x₂ + ..) is conformed with the random values and xₙ must be chosen in order to satisfy the equation. So we would have the equation:
(X - (x₁ + x₂ +....)/n)*n = n*X - (x₁ + x₂ +....) = xₙ
The equation that can be solved, so a maximum of n-1 can be freely selected.