Bobo has a sequence $a_1, a_2, \dots, a_n$.
Let $f(x)$ be the length of longest *strictly* increasing subsequence after replacing all the occurrence of $0$ with $x$.
He would like to find $\sum_{i = 1}^n i \cdot f(i)$.
Note that the length of longest strictly increasing subsequence of sequence $s_1, s_2, \dots, s_m$ is the largest $k$
such that there exists $1 \leq i_1 < i_2 < \dots < i_k \leq m$ satisfying $s_{i_1} < s_{i_2} < \dots < s_{i_k}$.