Largest possible value of trigonometric functions
Let $a_{2015}=a_1.$
Thus, by AM-GM $$\sum_{k=1}^{2014}\sin{a_k}\cos{a_{k+1}} \leq\sum_{k=1}^{2014}|\sin{a_k}||\cos{a_{k+1}}| \le$$ $$\leq\sum_{k=1}^{2014}\frac{\sin^2a_k+\cos^2a_{k+1}}{2}=\sum_{k=1}^{2014}\frac{\sin^2a_k+\cos^2a_k}{2}=\frac{2014}{2}=1007.$$
The equality occurs for $a_i=45^{\circ},$ which says that $1007$ is a maximal value.
From
$$ f_n(a) = \sum_{k=1}^n \sin a_k \cos a_{k+1} $$
with $a_{n+1} = a_1$
the stationary points are located at the solutions for
$$ \frac{\partial }{\partial a_k}f_n(a) = -\sin a_{k-1}\sin a_k + \cos a_k \cos a_{k+1} = 0 $$
and then
$$ \tan a_n\tan a_{n-1}\cdots\tan a_{2} = \cot a_1 $$
or
$$ \tan a_n\tan a_{n-1}\cdots\tan a_{2}\tan a_1 = 1 $$
or
$$ \prod_k\sin a_k = \prod_k\cos a_k $$
which is obtained for $a_k = \frac{\pi}{4}$ when
$$ f_n(a) = \frac n2 $$