#include <cmath>
#include <iostream>

int count_digits(int n) {
  return static_cast<int>(floor(log10(n))) + 1;
}

int main() {
  int n, m;
  while (!std::cin.eof()) {
    std::cin >> n >> m;
    std::cout << count_digits(n + m) << std::endl;
  }
}