#include <stdio.h>
#include <string.h>

int main(void)
{
	int sum = 0;
	char a;

	while(1){
		sum = 0;
		while(scanf("%c", &a), a != ' ')
			sum++;
		while(scanf("%c", &a), a != '\n')
			sum++;
		printf("%d\n", sum);

	}

	return 0;
}