import java.util.*; public class Exercise112{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); int d = sc.nextInt(); String weeks = sc.next() + sc.next(); char[] wa = weeks.toCharArray(); int max = 0; int xCount = 0; for(int i = 0; i < wa.length; i++){ if(wa[i] == 'x'){ xCount++; if(xCount >= d){ char[] wd = Arrays.copyOf(wa, wa.length); for(int j = 0; j < d; j++){ wd[i - j] = 'o'; } int oCount = 0; for(char charInWd: wd){ if(charInWd == 'o'){ oCount++; max = Math.max(max, oCount); }else{ oCount = 0; } } } }else{ xCount = 0; } } System.out.println(max); } }