import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No203 { public static void main(String[] args) throws IOException{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); String str2 = br.readLine(); int count = 0; count = check(str, count); count = check(str2, count); System.out.println(count); } public static int check(String s, int n){ int ans = n; char[] day = s.toCharArray(); for(int i=0; i < 7; i++){ if(day[i] == 'o') ans++; else ans = 0; } return ans; } }