At each step, Petya reduces the product of the numbers on the board by the number he writes on the paper: $x(y-x)$ $=x y-x^{2}$. Since the product on the board will be equal to 0 at the end, the sum on the paper is equal to the initial product $x y$.

Answer

## $x y$.

Send a comment
Gorskiy E.A.

Two natural numbers $x$ and $y$ ($x \leq y$) are written on the board in ascending order. Petya writes down $x^2$ (the square of the first number) on a piece of paper, and then replaces the numbers on the board with $x$ and $y-x$, writing them in ascending order. With the new numbers on the board, he performs the same operation, and so on, until one of the numbers on the board becomes zero. What will be the sum of the numbers on Petya's paper at this moment?