Question 26
Diana colours some cells black in a rectangular grid. In every white cell she writes the number of black cells sharing a side with it. A 12-cell example is shown. For a rectangular grid with 2018 cells, what is the greatest possible sum of all written numbers?

