#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <cctype>
#include <cstring>
#include <string>
#include <vector>


using namespace std;

int main()
{
    int i,j,sum;
    int t,dcount=0;
    while(scanf("%d",&i) != EOF && dcount <200)
    {
        int counter=0;
        int sum=0;
        cin >> j;
        sum=i+j;

        while(sum!=0)
        {
            t=sum%10;
            sum= sum/10;
            if(t!=0)
                counter++;
        }

        sum++;
        cout << counter <<endl;
        dcount++;
    }
}