Problem: Let $n$ be a positive integer.
We have $n$ boxes where each box contains a non-negative number of pebbles.
In each move we are allowed to take two pebbles from a box we choose,
throw away one of the pebbles and put the other pebble in another box we choose.
An initial configuration of pebbles is called \emph{solvable} if it is possible
to reach a configuration with no empty box, in a finite (possibly zero) number of moves.
Determine all initial configurations of pebbles which are not solvable,
but become solvable when an additional pebble is added to a box,
no matter which box is chosen.

Solution: The point of the problem is to characterize all the solvable configurations.
We claim that it is given by the following:
\begin{claim*}
  A configuration $(a_1, \dots, a_n)$ is solvable if and only if
  \[ \sum_{i=1}^n \left\lceil \frac{a_i}{2} \right\rceil \ge n. \]
\end{claim*}

\begin{proof}
  The proof is by induction on the number of stones.
  If there are fewer than $n$ stones there is nothing to prove.
  Now assume there are at least $n$ stones,
  and let $S = \sum \left\lceil a_i/2 \right\rceil$.
  Then:
  \begin{itemize}
    \ii If $S < n$, this remains true after any operation,
    so by induction the configuration is not solvable.
    \ii Suppose $S \ge n$, and also that there is an empty box (else we are already done).
    Then there must be some box with at least two stones.
    In that case, using those two stones to fill the empty box
    does not change the value of $S$,
    but decreases the total number of stones by one, as desired.
    \qedhere
  \end{itemize}
\end{proof}

From here we may then extract the answer to the original problem:
we require all $a_i$ to be even and $\sum a_i = 2n-2$.

\begin{remark*}
  It should be unsurprising that a criteria of this form exists,
  since (1) intuitively, one loses nothing by filling empty boxes as soon as possible,
  and then ignoring boxes with one pebble in them,
  (2) the set of configurations is a graded partially ordered set,
  so one can inductively look at small cases.
\end{remark*}