using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static string[] SList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => ReadLine()).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, m) = (c[0], c[1]); var s = SList(n); var count = new int[m]; foreach (var si in s) for (var i = 0; i < si.Length; ++i) if (si[i] == 'o') ++count[i]; WriteLine(n - count.Min() + 1); } }