while True:
    try:a,b=map(int,input().split())
    except:break
    if a=="" or b==":":
        break
    c=a+b
    ans=0
    if c>=0 and c<=9:
        ans=1
    if c>=10 and c<=99:
        ans=2
    if c>=100 and c<=999:
        ans=3
    if c>=1000 and c<=9999:
        ans=4
    if c>=10000 and c<=99999:
        ans=5
    if c>=100000 and c<=999999:
        ans=6
    if c>=1000000 and c<=9999999:
        ans=7

    print(ans) while True:
    try:a,b=map(int,input().split())
    except:break
    if a=="" or b==":":
        break
    c=a+b
    ans=0
    if c>=0 and c<=9:
        ans=1
    if c>=10 and c<=99:
        ans=2
    if c>=100 and c<=999:
        ans=3
    if c>=1000 and c<=9999:
        ans=4
    if c>=10000 and c<=99999:
        ans=5
    if c>=100000 and c<=999999:
        ans=6
    if c>=1000000 and c<=9999999:
        ans=7

    print(ans) True try:a,b=map(int,input().split())
    except:break
     except:break
     if a=="" or b==":":
        break
     a=="" or b==":" a=="" a "" b==":" b ":" break c=a+b c a+b a b ans=0 ans 0 if c>=0 and c<=9:
        ans=1
     c>=0 and c<=9 c>=0 c 0 c<=9 c 9 ans=1 ans 1 if c>=10 and c<=99:
        ans=2
     c>=10 and c<=99 c>=10 c 10 c<=99 c 99 ans=2 ans 2 if c>=100 and c<=999:
        ans=3
     c>=100 and c<=999 c>=100 c 100 c<=999 c 999 ans=3 ans 3 if c>=1000 and c<=9999:
        ans=4
     c>=1000 and c<=9999 c>=1000 c 1000 c<=9999 c 9999 ans=4 ans 4 if c>=10000 and c<=99999:
        ans=5
     c>=10000 and c<=99999 c>=10000 c 10000 c<=99999 c 99999 ans=5 ans 5 if c>=100000 and c<=999999:
        ans=6
     c>=100000 and c<=999999 c>=100000 c 100000 c<=999999 c 999999 ans=6 ans 6 if c>=1000000 and c<=9999999:
        ans=7

     c>=1000000 and c<=9999999 c>=1000000 c 1000000 c<=9999999 c 9999999 ans=7 ans 7 print(ans) print ans c=a+b a+b c ans=3 3 ans ans=7 7 ans ans=1 1 ans ans=5 5 ans ans=0 0 ans ans=4 4 ans ans=2 2 ans ans=6 6 ans
while True:
    try:a,b=map(int,input().split())
    except:break
    if a=="" or b==":":
        break
    c=a+b
    ans=0
    if c>=0 and c<=9:
        ans=1
    if c>=10 and c<=99:
        ans=2
    if c>=100 and c<=999:
        ans=3
    if c>=1000 and c<=9999:
        ans=4
    if c>=10000 and c<=99999:
        ans=5
    if c>=100000 and c<=999999:
        ans=6
    if c>=1000000 and c<=9999999:
        ans=7

    print(ans)
