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