The numbers from 1 to n are written on a paper in increasing order. Between each pair of adjacent digits (and before the first) alternately + and - are placed. Find the resalt of this expression.
For example, if n = 12, then it is easy to see that the sum equals to five:
+ 1 - 2 + 3 - 4 + 5 - 6 + 7 - 8 + 9 - 1 + 0 - 1 + 1 - 1 + 2 = 5
The first line contains an integer n (1 ≤ n ≤ 10^15).
Print the result of the given expression