#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main() { ll n, m, max1 = 0; cin >> n >> m; vector> s(n, vector(m)); for (ll i = 0; i < n; i++) { string yn; cin >> yn; for (ll j = 0; j < m; j++) { if (yn[j] == 'x') s[i][j]++; } } for (ll i = 0; i < m; i++){ ll sum1 = 0; for (ll j = 0; j < n; j++){ sum1 += s[j][i]; } max1 = max(max1, sum1); } cout << max1 + 1 << endl; }