#include <iostream>
using namespace std;
int main(){
    int a,b,c;
    
    while(cin >> a >> b,a!=EOF || b!= EOF){
        int ans = 0;
        for(c = a + b;c!=0;ans++,c/=10);

        cout << ans << endl;
    }
    return 0;
}