A group of children held a grape-eating contest.
When the contest was over, the winner had eaten N grapes, where N is a positive integer.
The child in Mth place had eaten N + 2 – 2M grapes.

A group of children held a grape-eating contest.
When the contest was over, the winner had eaten N grapes, where N is a positive integer.
The child in Mth place had eaten N + 2 – 2M grapes.
The total number of grapes eaten in the contest was 2016.
Find the smallest possible value of N.