#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  int dp[n][m];
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++) {
      if (j == 0) {
        dp[i][j] = s[j] == '1';
      } else {
        if (s[j] == '1') {
          dp[i][j] = dp[i][j - 1] + 1;
        } else {
          dp[i][j] = 0;
        }
      }
    }
  }
  int ans = 0;
  for (int i = 0; i < m; i++) {
    vector<int> v;
    for (int j = 0; j < n; j++) {
      v.push_back(dp[j][i]);
    }
    sort(v.begin(), v.end());
    for (int j = 0; j < n; j++) {
      ans = max(ans, (n - j) * v[j]);
    }
  }
  cout << ans;
  return 0;
}
