3. On each of 25 sheets of paper, one of the numbers 1 or -1 is written. The number -1 is written 13 times. It is allowed to remove two sheets and replace them with a sheet on which the product of the removed numbers is written. The procedure is repeated 24 times. What number is written on the last sheet of paper?
Solution. If two leaves with the same numbers are removed, a leaf with the number 1 is added. If two leaves with different numbers are removed, a leaf with the number -1 is added. We can observe that the product of all numbers, when performing the procedure of discarding two numbers and replacing them with the product, does not change. At the beginning, we have 13 negative units and 12 positive units. The product of all numbers at the beginning is -1. Therefore, at the end, the product will again be -1, meaning there must be an odd number of -1s, so the last written number will be -1.