#include <bits/stdc++.h>

using namespace std;

int main()
{
  int N;
  string S;
  cin >> N;
  cin >> S;
  int ret = 0;
  bool flip = false;
  for(int i = 0; i < S.size(); i++) {
    if(flip && S[i] == 'x') {
      break;
    } else if(S[i] == 'x') {
      flip = true;
      ++ret;
    } else {
      ++ret;
      flip = false;
    }
  }

  cout << ret << endl;
}