#include <cstdio>
#include <iostream>

using namespace std;

int a, b;

void solve(int n) {
	if (!n) return;
	++b, solve(n / 10);
}

int main() {
	while (scanf("%d%d", &a, &b) != EOF) {
		a += b, b = 0;
		solve(a);
		printf ("%d\n", b); 
	}
	return 0;
}