A whole number is written on each square of a board of 2019×2021 squares. If the number written in each square is equal to the arithmetic mean of the numbers written in two of its neighboring squares, how many different numbers written on the blackboard can there be at most? Note: Two squares on the board are neighbors when they have a common side.