#include <bits/stdc++.h>
using namespace std;
char input[5000][5000];
int dp[5000][5000] = {0}, tmp[5000], n, m, ans = 0;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++)
    scanf("%s", &input[i]), dp[i][0] = input[i][0] - '0';
  for (int i = 0; i < n; i++)
    for (int j = 1; j < m; j++)
      if (input[i][j] - '0' & 1) dp[i][j] = dp[i][j - 1] + 1;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) tmp[j] = dp[j][i];
    sort(tmp, tmp + n);
    for (int j = 0; j < n; j++) ans = max(ans, tmp[j] * (n - j));
  }
  printf("%d\n", ans);
  return 0;
}
