Output #1
6
Let $C_i$ denote the value of the $i$\-th counter.
Here is one possible progression of the process.
* Set the value of the $1$\-st counter to $0$, and then increase the value of the other counter by $1$. Now, $(C_1,C_2)=(0,1)$.
* Set the value of the $2$\-nd counter to $0$, and then increase the value of the other counter by $1$. Now, $(C_1,C_2)=(1,0)$.
* Set the value of the $1$\-st counter to $0$, and then increase the value of the other counter by $1$. Now, $(C_1,C_2)=(0,1)$.
* Set the value of the $1$\-st counter to $0$, and then increase the value of the other counter by $1$. Now, $(C_1,C_2)=(0,2)$.
In this case, the operation is performed four times.
The probabilities that the process ends after exactly $1,2,3,4,5,\ldots$ operation(s) are $0,\frac{1}{4}, \frac{1}{8}, \frac{1}{8}, \frac{3}{32},\ldots$, respectively, so the sought expected value is $2\times\frac{1}{4}+3\times\frac{1}{8}+4\times\frac{1}{8}+5\times\frac{3}{32}+\dots=6$. Thus, $6$ should be printed.