#include <iostream>
#include <cstdio>
int main(int argc, const char * argv[])
{
    int a, b, ab = 0, ans;
    
    while(scanf("%d %d", &a, &b) != EOF){
        if (a < 0 || 1000000 < a) {
            while (a < 0 || 1000000 < a) {
                scanf("%d %d", &a, &b);
            }
        }
        if (b < 0 || 1000000 < b) {
            while (b < 0 || 1000000 < b) {
            scanf("%d %d", &a, &b);
            }
        }
        ab = a + b;
        ans = 0;
        while (ab) {
            ans++;
            ab /= 10;
        }
        printf("%d\n", ans);
    }
    return 0;
}