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