#include <stdio.h>
#include <string.h>
int main()
{
FILE *fin;
char str[300];
char *word = NULL;
int count = 0;
fin = fopen("input.txt", "r");
fgets(fin, str, 300);
fgets(fin, str, 300);
fgets(fin, str, 300);
word = strtok (str, " ,.");
while (word)
{
count++;
word = strtok (NULL, " ,.");
}
printf("%i\n", count);
return 0;
}