import java.util.Scanner; public class Main { static int max = 0; static int n; public static void main(String[] args) { try (Scanner scan = new Scanner(System.in)) { n = Integer.parseInt(scan.next()); String str = scan.next() + scan.next(); solve(str); solve(new StringBuffer(str).reverse().toString()); System.out.println(max); } } static void solve(String str) { int count = 0; for(int i=0; i=0; i--) { if(str.charAt(i) == 'o') { count++; } else { break; } } max = Math.max(max, count+n); for(int i=0; i n) { count2 = n; max = Math.max(max, count1+count2); } else { int count3 = 0; int l; for(l=k; l