#include<iostream>
#include<sstream>
#include<cstdio>
#include<fstream>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;

int size(int n){
	int ret = 0;
	while(n>0){
		++ret;
		n/=10;
	}
	return ret;
}

int main(){
	int i,j;
	while(scanf("%d %d",&i,&j)==2){
		printf("%d\n",size(i+j));
	}
	return 0;
}