# -*- coding: utf-8 -*-

import sys
import os

for s in sys.stdin:
    a, b = list(map(int, s.split()))
    c = a + b

    if c == 1:
        print(1)
        continue

    for i in range(7):
        left = 10 ** i
        right = 10 ** (i + 1)
        if left <= c < right:
            print(i + 1)
            break import sys sys import os os for s in sys.stdin:
    a, b = list(map(int, s.split()))
    c = a + b

    if c == 1:
        print(1)
        continue

    for i in range(7):
        left = 10 ** i
        right = 10 ** (i + 1)
        if left <= c < right:
            print(i + 1)
            break s sys.stdin sys stdin a, b = list(map(int, s.split())) a list(map(int, s.split())) list map(int, s.split()) map int s.split() s.split s split b c = a + b c a + b a b if c == 1:
        print(1)
        continue

     c == 1 c 1 print(1) print 1 continue for i in range(7):
        left = 10 ** i
        right = 10 ** (i + 1)
        if left <= c < right:
            print(i + 1)
            break i range(7) range 7 left = 10 ** i left 10 ** i 10 i right = 10 ** (i + 1) right 10 ** (i + 1) 10 i + 1 i 1 if left <= c < right:
            print(i + 1)
            break left <= c < right left <= c left c right print(i + 1) print i + 1 i 1 break b = list(map(int, s.split())) list(map(int, s.split())) b left = 10 ** i 10 ** i left right = 10 ** (i + 1) 10 ** (i + 1) right a, b = list(map(int, s.split())) list(map(int, s.split())) a c = a + b a + b c
# -*- coding: utf-8 -*-

import sys
import os

for s in sys.stdin:
    a, b = list(map(int, s.split()))
    c = a + b

    if c == 1:
        print(1)
        continue

    for i in range(7):
        left = 10 ** i
        right = 10 ** (i + 1)
        if left <= c < right:
            print(i + 1)
            break