#include <iostream>
using namespace std;
int main(void){
    int a,b,ans = 0;
    for (int i = 0; i < 3; i++){
        std::cin >>a>>b;
        ans = a + b;
        ans /= 10;
        if(ans  <= 9){
            ans = 2;
        }
        else if(ans <= 99){
            ans = 3;
        }
        else if(ans <= 999){
            ans = 4;
        }
        std::cout << ans << std::endl;
    }
    return 0;
}