1 #include <stdio.h>
2 #include <string.h>
3
4 char a[10100];
5 int f(){
6 int i, j, k, n;
7 char temp[30];
8 char s[100][30];
9
10 j = 0, k = 0;
11 for(i = 0; a[i] != '\0'; i++){
12 if(a[i] != ' '){
13 temp[j++] = a[i];
14 }
15 if(a[i] != ' ' && (a[i+1] == ' ' || a[i+1] == '\0')){
16 temp[j] = '\0';
17 j = 0;
18 if(k == 0){
19 strcpy(s[k++],temp);
20 }else{
21 for(n = 0; n < k; n++){
22 if(strcmp(s[n],temp) == 0)break;
23 }
24 if(n == k){
25 strcpy(s[k++],temp);
26 }
27 }
28 }
29 }
30 return k;
31 }
32 int main() {
33
34 gets(a);
35 printf("%d",f());
36
37 return 0;
38 }