#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;
const int N = 5001;
int up[N][N];
char a[N][N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m, ans = 0;
  cin >> n >> m;
  for (int i = 1; i <= (int)(n); i++) {
    for (int j = 1; j <= (int)(m); j++) {
      cin >> a[i][j];
      if (a[i][j] == '1') up[i][j] = up[i][j - 1] + 1;
    }
  }
  for (int j = 1; j <= (int)(m); j++) {
    vi x;
    for (int i = 1; i <= (int)(n); i++) x.push_back(up[i][j]);
    sort((x).begin(), (x).end());
    for (int i = 0; i < (int)((int)x.size()); i++)
      ans = max(ans, x[i] * ((int)x.size() - i));
  }
  cout << ans << endl;
}
