fun main(){println((readLine()!!+readLine()!!).split("x").filter{it.isNotEmpty()}.map{it.count{it=='o'}}.max())}