#include <iostream>
#include <string>
using namespace std;

bool is_strelka(string s) {
	if (s == ">>-->" || s == "<--<<") {
		return true;
	}
	
	return false;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	string s;
	cin >> s;
	
	if (s.length() < 5) {
		cout << 0;
		return 0;
	}
	
	int res = 0;
	
	for (int i = 0; i < s.length() - 4; i++) {
		if (is_strelka(s.substr(i, 5))) {
			res++;
		}
	}
	
	cout << res;
	
	
	return 0;
}
