Gan Jiang was one of Yu Zhou's friends but worked for Cao Cao. One day Gan Jiang visited Yu Zhou's army and would like to steal something from Yu Zhou's army in the midnight. Yu Zhou invited him to stay for the whole night and set up guards.
Gan Jiang saw there are $N$ forts numbered 0, 1, 2, …, n-1 in Yu Zhou's army, the guards are connecting the neighbours forts, including $(0,1), (1,2)...(n-2,n-1), (n-1,0)$ to form a simple polygon. Gan Jiang was in the fort 0 only allowed to walk towards the higher numbered forts in straight line. He was not allowed to go inside of the polygon even pass by other vertices, but he can go along the edges of the polygon, e.g, go from fort 2 to fort 3. When Gan Jiang arrived a fort, he could steal letters of value $V_{i}$. But walking makes him unhappy and for each unit length walking, he will get 1 unit of unhappiness, Gan Jiang could end this mission at any time and ride a horse back to Cao Cao.
$$Figure\ 1:\ 3_{rd}\ sample$$
Gan Jiang would like to make the total value of letters as big as possible, but make the unhappiness as low as possible. So his target is to make the total value of letters minus total unhappiness as big as possible. Help Gan Jiang to get it.