fun main() { println( (readln() + readln()) .split('x') .maxOfOrNull { it.count { c -> c == 'o' } } ?: 0 ) }