PUMaC 2023 Number Theory A Problem 3

Call an arrangement of n not necessarily distinct nonnegative integers in a circle wholesome when, for any subset of the integers such that no pair of them is adjacent in the circle, their average is an integer. Over all wholesome arrangements of n integers where at least two of them are distinct, let M(n) denote the smallest possible value for the maximum of the integers in the arrangement. What is the largest integer n < 2023 such that M(n+1) is strictly greater than M(n)?