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