#include <iostream>
using namespace std;
const int N=105;
int n;
char g[N];
int res;
int main()
{
cin>>n;
cin>>g;
for(int i=0;i<n-2;i++){
if(g[i]!='x') continue;
int j=i+1;
while(j<n&&g[j]=='x') j++;
if(j-i>2) res+=j-i-2;//r若有连续的
i=j-1;
}
cout<<res;
//cout << "Hello world!" << endl;
return 0;
}