#include <bits/stdc++.h>
using namespace std;
const int N = 105;
char s[N];
int main()
{
    int n, cnt, ans;
    while (~scanf("%d%s", &n, s))
    {
        cnt = ans = 0;
        for (int i = 0; i <= n; i++)
            if (s[i] == 'x')
                cnt++;
            else
            {
                ans += max(0, cnt - 2);
                cnt = 0;
            }
        printf("%d\n", ans);
    }
    return 0;
}