#include <stdio.h>
#include <string.h>

int main() {
	
	int cnt = 0;
	
	char str[101];
	scanf("%s", str); 
	
	char croa[8][4] = {"c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z="};
	
	int len = strlen(str);
	
	for (int i = 0; i < len; i++) {
		int tmp = 0;
		for (int j = 0; j < 8; j++) {
			if (str[i] == croa[j][0]) {
				if (j == 2) {
					if ((str[i+1] == croa[j][1]) && (str[i+2] == croa[j][2])) {
						cnt++;
						i += 2;
						tmp = 1;
						break;
					}
				}
				if (str[i+1] == croa[j][1]) {
					cnt++;
					i++;
					tmp =1;
					break;
				}
			}
		}
		if (tmp == 0)
			cnt++;
	}
	printf("%d", cnt);
	
	return 0;
}