/* AOJ0002 */
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;

int main(){
  int a, b, sum;
  while(cin >> a >> b){
    sum = a + b;
    switch(sum){
    case 0 ... 9:
      cout << 1 << endl;
      break;
    case 10 ... 99:
      cout << 2 << endl;
      break;
    case 100 ... 999:
      cout << 3 << endl;
      break;
    case 1000 ... 9999:
      cout << 4 << endl;
      break;
    case 10000 ... 99999:
      cout << 5 << endl;
      break;
    case 100000 ... 999999:
      cout << 6 << endl;
      break;
    default:
      cout << 7 << endl;
    }
  }
  return 0;
}