while True:
    try:
        words = list(map(str,input().split()))
        print(len(words[-1]))
    except:
        break