#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, m, x, oc = 0, ec = 0;
  set<int> s, e, o;
  cin >> n >> m;
  vector<int> a(n), p0;
  for (int i = 1; i <= min(2 * n, m); i += 2) o.insert(i);
  for (int i = 2; i <= min(2 * n, m); i += 2) e.insert(i);
  for (int i = 0; i < n; i++) {
    cin >> x;
    if (s.find(x) == s.end()) {
      if (x % 2 == 0 && ec < n / 2) {
        a[i] = x;
        s.insert(x);
        e.erase(x);
        ec++;
      } else if (x % 2 == 1 && oc < n / 2) {
        a[i] = x;
        s.insert(x);
        o.erase(x);
        oc++;
      }
    }
    if (a[i] == 0) p0.push_back(i);
  }
  int i0 = 0;
  bool good = 1;
  for (int i = oc; i < n / 2; i++) {
    if (o.empty()) {
      good = 0;
      break;
    }
    a[p0[i0++]] = *(o.begin());
    o.erase(o.begin());
  }
  for (int i = ec; i < n / 2; i++) {
    if (e.empty()) {
      good = 0;
      break;
    }
    a[p0[i0++]] = *(e.begin());
    e.erase(e.begin());
  }
  if (good) {
    cout << i0 << "\n";
    for (auto x : a) cout << x << " ";
  } else
    cout << -1;
  cout << "\n";
  return 0;
}
