#include <iostream>                                             
#include <cmath>                                                
using namespace std;                                            
                                                                
int main(void) {                                                
  int a, b;                                                     
  int ans = 0;                                                  
  while (true) {                                                
    cin >> a >> b;                                              
    ans = log10(a+b)+1;                                         
    cout << ans << endl;                                        
  }                                                             
  return 0;                                                     
}                                