#include <iostream>

int main(int argc, const char * argv[]) {
    
    std::string a, b ;
    
    
    while ( std::cin >> a >> b ) {
        printf("%lu\n", a.length() + b.length()) ;
    }
    
    return 0;
}

