a = abs(int(input()))
counter = 0
while a > 0:
counter += 1
a //= 10
print(counter)
Либо:
print(len(str(a)))
a = abs(int(input()))
counter = 0
while a > 0:
counter += 1
a //= 10
print(counter)
Либо:
a = abs(int(input()))
print(len(str(a)))