#include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;
int main(void)
{
	long long int a, b;
	int ans[200],cou = 0;
	while ((scanf_s("%lld %lld",&a,&b)) != EOF) {
		for (int i = 1, j = 1; i <= 7; i++, j *= 10) {
			if (a + b / j <= 0) {
				ans[cou] = i;
				cou++;
				break;
			}
		}
	}
}