#include <stdio.h>

int main(){	
	char c[3],t;
	c[2]=' ';
	c[1]=' ';
	c[0]=' ';
	int counter;
	counter=0;
	while (1){
		t=getchar();
		if (t==10)
			continue;
		if ((int)t<=0)
			break;
		c[2]=c[1];
		c[1]=c[0];
		c[0]=t;
		if((c[2]==' '|c[2]=='.')&c[1]==c[0]&c[1]!=' '&c[1]!='.')
			counter++;	
	}
	printf("\n :: %d  ",counter);
	return 0;
}


