def solve():
    from sys import stdin
    input_lines = stdin
    
    from math import log10
    
    for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1)

solve() def solve():
    from sys import stdin
    input_lines = stdin
    
    from math import log10
    
    for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1) solve from sys import stdin input_lines = stdin input_lines stdin from math import log10 for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1) line input_lines a, b = map(int, line.split()) a map(int, line.split()) map int line.split() line.split line split b if (a == 0 and b == 0):
            break
        
         a == 0 and b == 0 a == 0 a 0 b == 0 b 0 break print(int(log10(a + b)) + 1) print int(log10(a + b)) + 1 int(log10(a + b)) int log10(a + b) log10 a + b a b 1 solve() solve def solve():
    from sys import stdin
    input_lines = stdin
    
    from math import log10
    
    for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1) def solve():
    from sys import stdin
    input_lines = stdin
    
    from math import log10
    
    for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1) solve
def solve():
    from sys import stdin
    input_lines = stdin
    
    from math import log10
    
    for line in input_lines:
        a, b = map(int, line.split())
        
        if (a == 0 and b == 0):
            break
        
        print(int(log10(a + b)) + 1)

solve()
