package yukicoder150508; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d = sc.nextInt(); String c = sc.next() + sc.next(); StringBuffer[] cc = new StringBuffer[c.length()]; for (int i = 0; i < c.length(); i++) { cc[i] = new StringBuffer(c); for (int j = i; j < i + d && j < cc[i].length(); j++) { if (cc[i].charAt(j) == 'x') { cc[i].setCharAt(j, 'o'); } else { break; } } } int max = 0; for (int j = 0; j < cc.length; j++) { int count = 0; for (int i = 0; i < cc[j].length(); i++) { if (cc[j].charAt(i) == 'o') { count++; max = Math.max(max, count); } else { count = 0; } } } System.out.println(max); sc.close(); } }