27 lines
384 B
C
27 lines
384 B
C
#include<stdio.h>
|
|
|
|
int main(){
|
|
int n=0,k=0;
|
|
char a;
|
|
while(scanf("%c",&a)!=EOF){
|
|
if(a=='\n'){
|
|
break;
|
|
}
|
|
if(a==' ') {
|
|
if(k==0){
|
|
k=1;
|
|
n++;
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
k=0;
|
|
}
|
|
|
|
if(k==1){
|
|
n--;
|
|
}
|
|
printf("%d",n+1);
|
|
return 0;
|
|
}
|