#include <stdio.h>
int main()
{
char alpha[101] = {};
int i, cnt = 0;
scanf_s("%s", alpha, sizeof(alpha));
for (i = 0; alpha[i] != '\0'; i++)
{
if (alpha[i] == 'c' && alpha[i + 1] == '=')
{
cnt++;
i++;
}
else if (alpha[i] == 'c' && alpha[i + 1] == '-')
{
cnt++;
i++;
}
else if (alpha[i] == 'd' && alpha[i + 1] == 'z' && alpha[i + 2] == '=')
{
cnt++;
i++;
i++;
}
else if (alpha[i] == 'd' && alpha[i + 1] == '-')
{
cnt++;
i++;
}
else if (alpha[i] == 'l' && alpha[i + 1] == 'j')
{
cnt++;
i++;
}
else if (alpha[i] == 'n' && alpha[i + 1] == 'j')
{
cnt++;
i++;
}
else if (alpha[i] == 's' && alpha[i + 1] == '=')
{
cnt++;
i++;
}
else if (alpha[i] == 'z' && alpha[i + 1] == '=')
{
cnt++;
i++;
}
else
{
cnt++;
}
}
printf("%d", cnt);
return 0;
}