public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = "";
		StringBuilder out = new StringBuilder();
		while ((line = in.readLine()) != null && line.length() != 0) {
			int k = Integer.parseInt(line.trim());
			Manacher m = new Manacher(in.readLine().trim());
			int count = 0;
			for (int i = 0; i < m.p.length; i++)
				if (m.p[i] >= k
						&& ((k % 2 == 0 && m.t[i] == '#') || (k % 2 == 1 && m.t[i] != '#')))
					count++;
			out.append(count + "\n");
		}
		System.out.print(out);
	}