Given an integer N, write a program that prints the count of the total number of digits between 1 and N.
Input
The input is a positive integer.
Output
The output should be a single line containing the count of the digits up to the given number.
Explanation
Given N = 10
From 1 to 9, each number contains a single digit. From 10 onwards, the numbers contain two digits.
So the output should be 9 + 2 = 11.
def digits(N):
st = ""
for i in range(1, N+1):
st += str(i)
print(len(st))
N = 10
digits(N)