#include<iostream>
using namespace std;

int main(){

	int a,b;
	cin >> a >> b;
	int c = a+b;
	for(int n = 1; 1 < 10000000; n*10)
	{
		int k = 0;
		if(c - n > 0)
		{k++;}
		else if(c - n < 0)
		{cout << k << endl;	break;}
	}
	

    return 0;
}