Given two sequences $A$ and $B$ of positive integers, both of length $n$, let $f(x)$ denote the number of digits of $x$ in decimal representation.
Little K needs to choose one number $A_i$ from $A$ and one number $B_j$ from $B$. You need to calculate the sum of $f(A_i+B_j)$ for all $n^2$ possible pairs.
Formally, you need to calculate $\sum_{i=1}^{n} \sum_{j=1}^{n} f(A_i+B_j)$.
Input
The first line contains a positive integer $N$.
The second line contains $N$ positive integers representing the sequence $A$.
The third line contains $N$ positive integers representing the sequence $B$.
Output
Output a single integer representing the answer.
Examples
Input 1
3 97 79 7 20 2 21
Output 1
20
Input 2
See the provided files.
Constraints
For all data, we have:
- $1 \le n \le 1.5 \times 10^5$
- $1 \le A_i,B_j \lt 10^9$
| Subtask | Special Properties | Score |
|---|---|---|
| $1$ | $n=1$ | $10$ |
| $2$ | $n \le 2000$ | $20$ |
| $3$ | $A_i,B_j \le 2000$ | $10$ |
| $4$ | $10^8 \le A_i,B_j \le 5 \times 10^8$ | $10$ |
| $5$ | $A_i,B_j \ge 10^8$ | $10$ |
| $6$ | $A_i \le 1.5 \times 10^5,\space B_j=j$ | $10$ |
| $7$ | $B_j = j$ | $10$ |
| $8$ | No special restrictions | $20$ |