while True:
try:
want_list = input().split(" ")
res = len(want_list[-1])
print(res)
except EOFError:
break

while True:
try:
want_list = input().split(" ")
res = len(want_list[-1])
print(res)
except EOFError:
break