#include <iostream>
using namespace std;
int main()
{
	int a,b;
	cin>>a;
	cin>>b;
	for(int a=0;a<=9;a++){
		a = 1;
	}for(int a=10;a<=99;a++){
		a = 2;
	}for (int a=100;a<=999;a++){
		a=3;
	}
	for(int b=0;b<=9;b++){
		b = 1;
	}for(int b=10;b<=99;b++){
		b = 2;
	}for (int b=100;b<=999;b++){
		b=3;
	}
	cout<<a+b<<endl;
}