/* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */

#include <iostream>
//#include	 <Windows.h>
using namespace std;

int x,y,z;
int main(){
	cin>>x>>y;
	z=x+y;
while(cin>>x>>y){
if (z>=0){
 if(z<10){
 	cout<<1<<endl;}
 else
  if(z<100){
  	cout<<2<<endl;}
  else
   if(z<1000){
   	cout<<3<<endl;}
   else
    if(z<10000){
    	cout<<4<<endl;}
    else
     if(z<100000){
     	cout<<5<<endl;}
     else
      if(z<1000000){
      	cout<<6<<endl;}
      else
        cout<<7<<endl;}}

return 0;
}