import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Patio {

    static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));


    public static void main(String[] args) throws IOException {

        int chars = Integer.parseInt(reader.readLine());
        int[] xs = new int[chars];
        int[] os = new int[chars];

        String line = reader.readLine();
        char[] cs = line.toCharArray();

        for (int i = 0; i < chars; i++) {
            if (cs[i] == 'x') {
                xs[i] = 1;
            } else {
                os[i] = 1;
            }

            if (i > 0) {
                xs[i] += xs[i - 1];
                os[i] += os[i - 1];
            }
        }

        int counter = 0;

        for (int i = 3; i < 448; i++) {
            int pow = (int) Math.pow(i, 2);

            if (pow > chars) {
                break;
            }

            for (int j = 0; j <= chars - pow; j++) {
                int x = xs[j + pow - 1] - (j > 0 ? xs[j - 1] : 0);
                int o = os[j + pow - 1] - (j > 0 ? os[j - 1] : 0);

                if (x % 4 == 0 || o % 4 == 0) {
                    counter++;
                }
            }

        }

        System.out.println(counter);

    }
}
