#include <bits/stdc++.h>   using namespace std;   int main() {     string A, B;     int ma = 0;     cin >> A >> B;     for (char &ch : A) ma = max(ma, ch -  0 );     for (char &ch : B) ma = max(ma, ch -  0 );     ma++;     int a = 0, b = 0;     for (char &ch : A) {       a = a * ma + ch -  0 ;     }     for (char &ch : B) {       b = b * ma + ch -  0 ;     }     a += b;     int ans = 0;     while (a) ans++, a /= ma;     cout << ans <<   n ;     return 0;   }   