Introduction - If you have any usage issues, please Google them yourself
Topic: training ground n (1 ≤ n ≤ 50000) were the same height are not lined up his soldiers from left to right, followed by numbered 1,2, ..., n. No. i soldiers height H (i), as a result of the use of special units, H (i) satisfy 1 ≤ H (i) ≤ 2000000000. I set up the first of the soldiers the right than his most recent high-soldiers numbered j, the first soldiers i can see is that the right side of his soldiers than his dwarf the number of S (i) = ji-1. (Without regard to objective factors, such as vision scope-,-) for S (1)+ S (2)+ ...+ S (n).