#include <bits/stdc++.h>
using namespace std;
int main()
{
    int digit{0} , digit1{0} , x , y;

    cin>>x>>y;

    while(x > 0 || y > 0){

      if(x > 0){
        x/=10;
        digit++;
      }
      if(y > 0){
        y/=10;
        digit1++;
      }

    }

    cout<<digit+digit1;

    return 0;
}

