Python
n=int(input())
if n>1 and n<10 or n==1:
print(1)
elif n>10 and n<100 or n==10 :
print(2)
elif n>100 and n<1000 or n==100 :
print(3)
elif n>1000 and n<10000 or n==1000:
print(4)
elif n>10000 and n<100000 or n==10000:
print(5)
elif n>100000 and n<1000000 or n==100000:
print(6)
elif n>1000000 and n<10000000 or n==1000000:
print(7)
elif n>10000000 and n<100000000 or n==10000000:
print(8)
elif n>100000000 and n<1000000000 or n==100000000:
print(9)
elif n>1000000000 and n<10000000000 or n==1000000000:
print(10)
else:
print(0)
Python
n=int(input())
if n>1 and n<10 or n==1:
print(1)
elif n>10 and n<100 or n==10 :
print(2)
elif n>100 and n<1000 or n==100 :
print(3)
elif n>1000 and n<10000 or n==1000:
print(4)
elif n>10000 and n<100000 or n==10000:
print(5)
elif n>100000 and n<1000000 or n==100000:
print(6)
elif n>1000000 and n<10000000 or n==1000000:
print(7)
elif n>10000000 and n<100000000 or n==10000000:
print(8)
elif n>100000000 and n<1000000000 or n==100000000:
print(9)
elif n>1000000000 and n<10000000000 or n==1000000000:
print(10)
else:
print(0)
СДЕЛАЙ ОТВЕТ ЛУЧШИМ!