# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break

'''
Sample Input
5 7
1 99
1000 999
''' while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break True try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break except:
        break break a,b = map(int,raw_input().split(' ')) a map(int,raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' b print len(str(a+b)) len str(a+b) str a+b a b '''
Sample Input
5 7
1 99
1000 999
''' a,b = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) a b = map(int,raw_input().split(' ')) map(int,raw_input().split(' ')) b
# coding: utf-8
#Problem Name: Digit Number
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

while True:
    try:
        a,b = map(int,raw_input().split(' '))
        print len(str(a+b))
    except:
        break

'''
Sample Input
5 7
1 99
1000 999
'''