Processes and Operations Invariants

Authors: Gorsky E.A., Dorichenko S.A.

Three natural numbers are written on the board. Petya writes down the product of any two of these numbers on a piece of paper, and decreases the third number by 1 on the board. With the new three numbers on the board, he repeats the same operation, and so on, until one of the numbers on the board becomes zero. What will the sum of the numbers on Petya's paper be at this moment?
At each step, Petya reduces the product of the numbers on the board by the number he writes on the paper: $x y(z-1)$ $=x y z-x y$, so the product of the numbers on the board added to the sum of the numbers on the paper does not change.

Since at the end the product on the board will be equal to 0, the sum on the paper is equal to the initial product of $xyz$.

## Answer

The product of the three initial numbers.

## Problem