#include #include using namespace std; using namespace atcoder; #define rep(i, n) for(int i = 0; i < n; i++) #define repr(i, n) for(int i = n; i >= 0; i--) #define range(i, m, n) for(int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() #define RALL(v) v.rbegin(), v.rend() #define sum(v) accumulate(ALL(v),0) #define int long long typedef long long ll; typedef vector vl; typedef vector> vvl; const ll MOD = 1000000007; const ll MOD2 = 998244353; const ll INF = 1e16; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } int SN(char s){return int32_t(s-'0');} int SN(string s){return stoi(s);} using Graph = vector>; int32_t main(){ int N,M;cin >> N >> M; vector S(N,""); rep(i,N)cin >> S[i]; vvl Snum(N,vl(M,0)); rep(i,N){ rep(j,M){ if(S[i][j]=='x'){ Snum[i][j]=1; } } } int Ans;Ans = 0; rep(j,M){ int tmp = 0; rep(i,N){ tmp+=Snum[i][j]; } Ans = max(Ans,tmp); } cout << Ans+1 << endl; }