Given an integer n, count the total number of times the digit 1 appears across all integers from 1 to n inclusive. The input is JSON {n}.
Input: JSON {n}.
Output: Integer — the total count of the digit 1.
Input: {"n":13}
Output: 6
Explanation: 1, 10, 11 (twice), 12, 13.Input: {"n":0}
Output: 0
Explanation: No numbers.Input: {"n":1}
Output: 1
Explanation: Just the number 1.0<=n<=2*10^9