Problem 3. A row of 101 numbers is written (the numbers are not necessarily integers). The arithmetic mean of all the numbers without the first one is 2022, the arithmetic mean of all the numbers without the last one is 2023, and the arithmetic mean of the first and last numbers is 51. What is the sum of all the written numbers?