#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define io ios::sync_with_stdio(false); cin.tie(0)

int main()
{
    io;
    int n, m; cin >> n >> m;
    ll a = 0, b = 0;
    rep(i, n) {
        string s;
        cin >> s;
        int cnt = 0;
        for (auto c : s) {
            if (c == '1') cnt++;
        }
        if (cnt % 2 == 0) a++;
        else b++;
    }
    cout << a*b << endl;
    return 0;
}
#include <bits/stdc++.h>
#include <variant>

#define rep2(i,k,n) for(i64 i=(i64)(k);i<(i64)(n);i++)
#define rep(i,n) rep2(i,0,n)
#define all(x) begin(x),end(x)
#ifdef ENV_LOCAL
#define dump if (1) cerr
#else
#define dump if (0) cerr
#endif

using namespace std;
using namespace std::string_literals;

using i32 = int32_t;
using i64 = int64_t;
using f64 = double;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;

//using namespace harudake;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  i32 n;
  cin>>n;
  vi32 oknum;
  rep2(i,1,5000) {
    if (i % 3 == 0 || i % 5 == 0 || i % 7 == 0) {
      oknum.push_back(i*2);
    }
  }
  rep(i,n-1) {
    cout<<oknum[i]<<" ";
  }
  cout<<(3*5*7)<<endl;
  return 0;
}
