If cosθ+isinθ is a root of the equation xn+a1xn−1+a2xn−2+.........+an−1x+an=0 then the value of ∑nr=1arcosrθ equals (where all coefficient are real)