#include <iostream>
#include <string>

int main()
{
    while(true){
        std::string a, b;
        std::cin >> a >> b;
        if(!std::cin) break;
        std::cout << a.length() + b.length() << std::endl;
    }
    return 0;
}