#include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

int main(void){
	int a, b;
	while(1){
		if(cin >> a == 0) break;
		cin >> b;

		if(a==0 && b==0){
			cout << "1" << endl;
			continue;
		}

		int count = 0;
		int c = a + b;
		while(c != 0){
			c /= 10;
			count++;
		}

	cout << count << endl;

	}

	return 0;
}