For a given number $n$ , $$3 \le n \le 3\cdot 10^6 $$ How can I find maximum value of $$ \sin x + \sin y + \sin z $$ where $$ x + y + z = n $$ and $x$, $y$ and $z$ are positive integers.
I have already tried using Lagrange's as described at Calculating $\max$ and $\min$ of $\sin(x) + \sin(y) + \sin(z)$, but it was solved for radian. How can I extend that for my problem?