Exactly one integer stands in each cell of an $m \times n$ table ($m \ge 4, n \ge 4$). The number in any cell is equal to the arithmetic mean of the numbers in some two neighboring cells (i.e. in the cells having the common side with the given cell).
Find the greatest possible number of all distinct integers in this table.