#include <bits/stdc++.h>
const int N = 5e3 + 5e2;
int Grid[N][N];
int n, m, a[N];
char tmp[N];
int main() {
  scanf("%d %d", &n, &m);
  int Pref[n][m];
  for (int i = 0; i < n; i++) {
    scanf("%s", tmp);
    for (int j = 0; j < m; j++) Grid[i][j] = (tmp[j] == '1');
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      Pref[i][j] = 0;
      if (Grid[i][j] == 1) Pref[i][j] = 1 + (j ? Pref[i][j - 1] : 0);
    }
  int Ans = 0;
  for (int j = 0; j < m; j++) {
    for (int i = 0; i < n; i++) a[i] = Pref[i][j];
    std::sort(a, a + n);
    for (int i = 0; i < n; i++) Ans = std::max(Ans, a[i] * (n - i));
  }
  printf("%d\n", Ans);
  return 0;
}
