import sequtils, strutils let x, y = readLine stdin echo max (x & y).split("x").mapIt it.len