#include <bits/stdc++.h>
using namespace std;
int m, n, a[200005], b[200005], ans, x, y;
set<int> o, e, s;
int main() {
  ios::sync_with_stdio(false);
  set<int>::iterator it;
  cin >> n >> m;
  for (int i = 1; i < 300005; i++)
    if (i % 2)
      o.insert(i);
    else
      e.insert(i);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] % 2) {
      x++;
      it = o.find(a[i]);
      if (it != o.end()) o.erase(it);
    } else {
      y++;
      it = e.find(a[i]);
      if (it != e.end()) e.erase(it);
    }
  }
  for (int i = 0; i < n; i++) {
    if (s.find(a[i]) == s.end()) {
      s.insert(a[i]);
      b[i] = a[i];
    } else {
      if (a[i] % 2) {
        if (x > y) {
          if (*e.begin() > m) {
            cout << "-1";
            return 0;
          }
          b[i] = *e.begin();
          x--;
          y++;
          e.erase(*e.begin());
          s.insert(b[i]);
        } else {
          if (*o.begin() > m) {
            cout << "-1";
            return 0;
          }
          b[i] = *o.begin();
          o.erase(*o.begin());
          s.insert(b[i]);
        }
      } else {
        if (y > x) {
          if (*o.begin() > m) {
            cout << "-1";
            return 0;
          }
          b[i] = *o.begin();
          x++;
          y--;
          o.erase(*o.begin());
          s.insert(b[i]);
        } else {
          if (*e.begin() > m) {
            cout << "-1";
            return 0;
          }
          b[i] = *e.begin();
          e.erase(*e.begin());
          s.insert(b[i]);
        }
      }
    }
  }
  if (x != y)
    for (int i = 0; i < n; i++) {
      if (b[i] % 2) {
        if (x > y) {
          if (*e.begin() > m) {
            cout << "-1";
            return 0;
          }
          x--;
          y++;
          b[i] = *e.begin();
          e.erase(*e.begin());
        }
      } else {
        if (y > x) {
          if (*o.begin() > m) {
            cout << "-1";
            return 0;
          }
          y--;
          x++;
          b[i] = *o.begin();
          o.erase(*o.begin());
        }
      }
    }
  for (int i = 0; i < n; i++)
    if (a[i] != b[i]) ans++;
  cout << ans << endl;
  for (int i = 0; i < n; i++) cout << b[i] << " ";
  return 0;
}
