
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      21:38 ~ 21:47
 */
#include <iostream>
#include <string.h>
using namespace std;

int iN, iM, iOutput;

bool input() {
  if (scanf("%d %d", &iN, &iM) == EOF) return false;
  return true;
}

void manage() {
  iOutput = 0;
  for (iN += iM; iN != 0; iN /= 10) {
    iOutput++;
  }
}

int main() {
  while (1) {
    if (!input()) break;
    manage();
    printf("%d\n", iOutput);
  }
}