#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <string> #include <utility> #include <tuple> #include <set> #include <map> #include <cassert> using namespace std; int main() { string s; cin >> s; char pre = '?'; string t; for (char c: s) { if (c != '=') { t += c; } else { if (pre != '=') { t += c; } } pre = c; } string u; for (char c: t) { u += c; if (u.size() < 3) { continue; } if (u.ends_with("<=>")) { u.pop_back(); u.pop_back(); u.pop_back(); } } cout << u.size() << endl; return 0; }