#include <bits/stdc++.h>
    using namespace std;
    int main()
    {
         int n,m,c=0;
        while(scanf("%d %d",&n,&m)!=EOF)
        {
            int sum=n+m;
            if(sum==0){
                c++;
            }
            while(sum!=0){
                sum=sum/10;
                c++;
            }


        }
         cout<<c<<endl;
    }


