#include <bits/stdc++.h>
using namespace std;
const int MaxN = 5010;
int n, m, a[MaxN], b[MaxN], sol;
char t[MaxN][MaxN];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> t[i][j];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (t[j][i] == '1')
        a[j]++;
      else
        a[j] = 0;
      b[j] = a[j];
    }
    sort(b, b + n);
    for (int j = 0; j < n; j++) sol = max(sol, b[j] * (n - j));
  }
  cout << sol;
  return 0;
}
