use std::io::Read; fn main() { let mut s = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let w: Vec<_> = s.split_whitespace().collect(); let (n, m): (usize, usize) = (w[0].parse().unwrap(), w[1].parse().unwrap()); let a = (0..m).fold(0, |a, i| { let mut c = 1; for j in 0..n { if &w[j + 2][i..=i] == "x" { c += 1; } } a.max(c) }); println!("{a}") }