#include #include #include #include #define REP(i, a, b) for (int i = int(a); i < int(b); i++) using namespace std; typedef long long int lli; int main() { string s; cin >> s; int cnt = 0; REP (i, 0, s.size()) cnt += (s[i] == '-'); cout << (s.size() - cnt) / 3 << endl; return 0; }