#include <bits/stdc++.h>
using namespace std;
int n, m, a[200005], o[2], d[2], op = 2, ep = 1, c = 0;
set<int> s, s2;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  d[1] = (m + 1) / 2;
  d[0] = m / 2;
  for (int l = 0; l < n; ++l) {
    cin >> a[l];
    if (s.count(a[l])) continue;
    s.insert(a[l]);
    o[a[l] % 2]++;
    if (a[l] <= m) d[a[l] % 2]--;
  }
  if (min(o[0] + d[0], o[1] + d[1]) < n / 2) {
    cout << -1;
    return 0;
  }
  for (int l = 0; l < n; ++l) {
    if (s2.count(a[l])) {
      if (o[0] < n / 2) {
        while (s.count(op) && op <= m) op += 2;
        a[l] = op;
        o[0]++;
        ++c;
      } else {
        while (s.count(ep) && ep <= m) ep += 2;
        a[l] = ep;
        o[1]++;
        ++c;
      }
    }
    s.insert(a[l]);
    s2.insert(a[l]);
  }
  for (int l = 0; l < n; ++l) {
    if (o[0] < n / 2 && a[l] % 2 == 1) {
      while (s.count(op) && op <= m) op += 2;
      a[l] = op;
      o[0]++;
      ++c;
    } else if (o[1] < n / 2 && a[l] % 2 == 0) {
      while (s.count(ep) && ep <= m) ep += 2;
      a[l] = ep;
      o[1]++;
      ++c;
    }
    s.insert(a[l]);
    s2.insert(a[l]);
  }
  cout << c << endl;
  for (int l = 0; l < n; ++l) cout << a[l] << ' ';
  return 0;
}
