#include using namespace std; int main() { int N, M; cin >> N >> M; vector S( N ); for( int i = 0; i < N; i++ ) cin >> S[i]; vector k( M ); for( int i = 0; i < N; i++ ) { for( int j = 0; j < M; j++ ) { if( S[i][j] == 'x' ) k[j]++; } } int ans = 0; for( int i = 0; i < M; i++ ) ans = max( ans, k[i] ); ans++; cout << ans << endl; }