#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
	int a=0,cnt=0,b=0;
	while(scanf("%d %d",&a,&b)!=EOF){
		a+=b;
		while(a>0){
			a/=10;
			cnt++;
		}
	}
	cout<<cnt<<endl;
	//cin>>h;
    return 0;
}