const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const C = lines.next().value + lines.next().value; let ans = 0, seq = 0; for (let c of C) { if (c === 'x') { seq = 0; } else { seq++; } ans = Math.max(ans, seq); } console.log(ans);