#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int MX = 200500;
int a[MX];
int cnt[2];
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int half = n / 2;
  if (n & 1) {
    cout << -1 << endl;
    return 0;
  }
  cnt[0] = cnt[1] = 0;
  vector<int> to_change;
  set<int> s;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    int k = a[i] & 1;
    if (cnt[k] == half || s.find(a[i]) != s.end()) {
      to_change.push_back(i);
      continue;
    }
    s.insert(a[i]);
    cnt[k]++;
  }
  int q = 0;
  for (int k = 0; k < 2; k++) {
    int pos = k;
    if (k == 0) pos = 2;
    for (int i = 0; i < half - cnt[k]; i++) {
      while (s.find(pos) != s.end()) pos += 2;
      if (pos > m) {
        cout << -1 << endl;
        return 0;
      }
      a[to_change[q++]] = pos;
      pos += 2;
    }
  }
  cout << to_change.size() << "\n";
  for (int i = 0; i < n; i++) {
    cout << a[i] << ' ';
  }
  cout << endl;
  return 0;
}
