#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  int count = 0;
  cin >> S;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] == 'o') {
      count++;
    }
  }
  if (count > S.size()) {
    count = S.size() - count;
  }
  cout << 2 * count << endl;
  return 0;
}
