#include<iostream>
#include<string.h>
#include<stdio.h>
using namespace std;
int main(){
int a,b,c;
char ans[100];
	while(1){
	cin>>a>>b;
		sprintf(ans,"%d",a+b);
	c=strlen(ans);
	cout<<c<<endl;
	}
return 0;
}