AT_abc444_d [ABC444D] Many Repunit Sum

Description

For $ i=1,2,\dots,N $ , let $ B_i $ denote the integer formed by concatenating $ A_i $ ones. More formally, $ B_i=\sum_{j=0}^{A_i-1}{10^j} $ . Find $ \sum_{i=1}^{N}{B_i} $ .

Input Format

The input is given from Standard Input in the following format: > $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $

Output Format

Output the answer in one line.

Explanation/Hint

### Sample Explanation 1 $ B_1=B_2=B_3=B_4=111 $ , so $ B_1+B_2+B_3+B_4=444 $ . ### Sample Explanation 2 The answer may be very large. ### Constraints - $ 1 \leq N \leq 2 \times 10^5 $ - $ 1 \leq A_i \leq 2 \times 10^5 $ - All input values are integers.