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


