import java.util.*; class Ideone{ public static void main (String[] args) throws java.lang.Exception { Scanner koko = new Scanner(System.in); int d = koko.nextInt(); String one = koko.next(); String two = koko.next(); String whole = "xxxxxxxxxxxxxx" + one + two + "xxxxxxxxxxxxxx"; if(whole.equals("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")){ System.out.println(d); }else{ String[] on = whole.split("o+"); int[] onseq = new int[on.length]; int counton = 0; int countoff = 0; int onp =0; int offp =0; for(int i=0; i