Minimizing the following function
$x_1+x_2+\cdots+x_n=P, 2\le x_i$ and $x_i$ are integers.
My attempt: In my opinion we obtain the result when all $x_i's$ are almost equal i.e. $|x_i-x_j|\le 0$ for all $i$ and $j$. I am trying to solve by Lagrange's multiplier and I obtained a system of equation which looks messy.