import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static int D; public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); boolean[] N = new boolean[14]; try { D = Integer.parseInt(stdReader.readLine()); String[] temp1 = stdReader.readLine().split(""); String[] temp2 = stdReader.readLine().split(""); int ans = 0; for(int i=0;i<7;i++) if(temp1[i].equals("o")) N[i] = true; for(int i=7;i<14;i++) if(temp2[i-7].equals("o")) N[i] = true; ans = calc(-1,N); for(int i=0;i<14;i++){ int count = 0; for(int j=0;j=0;i--){ if(N[i]){ count++; }else{ ans = Math.max(ans, count); count=0; } } }else{ for(int i=0;i