#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<char*> v(n);
  for (int i = 0; i < n; ++i) {
    v[i] = (char*)malloc(m + 1);
    scanf("%s", v[i]);
  }
  vector<vector<int> > p(n, vector<int>(m));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (v[i][j] == '1') {
        if (j) {
          p[i][j] = p[i][j - 1];
        }
        ++p[i][j];
      }
    }
  }
  int ans = 0;
  for (int end = 0; end < m; ++end) {
    vector<int> t(m + 1);
    for (int i = 0; i < n; ++i) ++t[p[i][end]];
    int cnt = 0;
    for (int i = 0; i < m + 1; ++i) {
      for (int j = 0; j < t[i]; ++j) {
        ans = max(ans, i * (n - cnt));
        ++cnt;
      }
    }
  }
  printf("%d", ans);
  return 0;
}
