#include <iostream>
using namespace std;
bool f (char x)
{
return ((x<='9') || (x>='a' && x<='z') || (x>='A' && x<='Z')); //Проверяем является ли символ частью числа или переменной.
}
int main()
{
char a,b,c;
int n=0;
a=getchar();
b=getchar();
while (EOF!=(c=getchar()))
{
if (f(a)&&f(c)&&(b=='*' || b=='-' || b=='+'))
{
n++;
}
a=b;
b=c;
}
cout<<n;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKYm9vbCBmIChjaGFyIHgpCnsKCXJldHVybiAoKHg8PSc5JykgfHwgKHg+PSdhJyAmJiB4PD0neicpIHx8ICh4Pj0nQScgJiYgeDw9J1onKSk7IC8v0J/RgNC+0LLQtdGA0Y/QtdC8INGP0LLQu9GP0LXRgtGB0Y8g0LvQuCDRgdC40LzQstC+0Lsg0YfQsNGB0YLRjNGOINGH0LjRgdC70LAg0LjQu9C4INC/0LXRgNC10LzQtdC90L3QvtC5Lgp9CgppbnQgbWFpbigpCnsKCWNoYXIgYSxiLGM7CglpbnQgbj0wOwoJYT1nZXRjaGFyKCk7CgliPWdldGNoYXIoKTsKCXdoaWxlIChFT0YhPShjPWdldGNoYXIoKSkpCgl7CgkJaWYgKGYoYSkmJmYoYykmJihiPT0nKicgfHwgYj09Jy0nIHx8IGI9PScrJykpCgkJewoJCQluKys7CgkJfQoJCWE9YjsKCQliPWM7Cgl9Cgljb3V0PDxuOwoJcmV0dXJuIDA7Cn0=