#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int n;
string s;
cin >> n >> s;
int res = 0;
for (int i = 0; i < n; i ++ )
{
if (s[i] != 'x') continue;
int j = i + 1;
while (j < n && s[j] == 'x') j ++ ;
res += max(0, j - i - 2);
i = j - 1;
}
cout << res << endl;
return 0;
}