#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

int main() {
  int x, y;
  while(cin>>x>>y) {
    char s[100];
    sprintf(s,"%d",x+y);
    cout << strlen(s) << endl;
  }
}