#include <bits/stdc++.h>
using namespace std;
bool ok[200107];
int a[200107], b[200107];
set<int> e, o;
int E = 2, O = 1;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  if (n & 1) {
    cout << -1 << endl;
    return 0;
  }
  int k = n >> 1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
    if (a[i] & 1) {
      if (o.size() < k && !o.count(a[i])) o.insert(a[i]), ok[i] = true;
    } else {
      if (e.size() < k && !e.count(a[i])) e.insert(a[i]), ok[i] = true;
    }
  }
  for (int i = 0; i < n; i++)
    if (!ok[i]) {
      if (o.size() < k) {
        while (o.count(O)) O += 2;
        b[i] = O;
        o.insert(O);
      } else {
        while (e.count(E)) E += 2;
        b[i] = E;
        e.insert(E);
      }
    }
  int diff = 0;
  for (int i = 0; i < n; i++)
    if (b[i] != a[i]) {
      diff++;
      if (b[i] > m) {
        cout << -1 << endl;
        return 0;
      }
    }
  cout << diff << endl;
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  cout << endl;
  return 0;
}
