# import sys
while True:
    try:
        s = input().split()[-1]
        print(len(s))
    except:
#         print(sys.exc_info())
        break