#include <stdio.h>
int main() {
int c, nb;
nb = 0;
while ((c=getchar()) != EOF){
if (c == '\t' || c == '\n' || c == ' '){
++nb;
}
printf("%d\n", nb);
return 0;