#include<iostream>
#include<cstring>
using namespace std;

int main() {
	int cnt = 0;
	char a;
	while (getchar()!= '\n') {
		cnt++;
	}
	while (getchar() != '\n') {
		cnt++;
	}
	cout << cnt<<endl;
	return 0;
}