#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int num,del;
int main(void) {
int n;
string s;
cin >> n >> s;
for(int i = 0;i<n;i++){
if(s[i] == 'x'){
num++;
if(num == 3){
num--;
del++;
}
}else {
num = 0;
}
}
cout << del << " ";
}