#include char s[1003][1003]; int main() { int n, m; scanf("%d %d", &n, &m); int i, j; for (i = 0; i < n; i++) scanf("%s", s[i]); int cnt_x[1003]; for (j = 0; j < m; j++) { cnt_x[j] = 0; for (i = 0; i < n; i++) if (s[i][j] == 'x') cnt_x[j]++; } int ans = 0; for (i = 0; i < m; i++) if (ans <= cnt_x[i]) ans = cnt_x[i] + 1; printf("%d\n", ans); return 0; }