#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long ara[200005];
map<long long, long long> mp;
deque<long long> even, odd;
long long cnte, cnto;
int main() {
  scanf("%lld %lld", &n, &m);
  for (long long i = 1; i <= n; i++) {
    scanf("%lli", &ara[i]);
    if (mp[ara[i]])
      ara[i] = 0;
    else {
      mp[ara[i]] = 1;
      if (ara[i] % 2)
        cnto++;
      else
        cnte++;
    }
  }
  for (long long i = 1; i <= min(m, 400005LL); i++) {
    if (!mp[i]) {
      if (i % 2)
        odd.push_back(i);
      else
        even.push_back(i);
    }
  }
  bool ans = true;
  long long res = 0;
  for (long long i = 1; i <= n; i++) {
    if (!ara[i]) {
      if (cnte < cnto) {
        if (even.size()) {
          ara[i] = even.front();
          even.pop_front();
          cnte++;
          res++;
        } else
          ans = false;
      } else {
        if (odd.size()) {
          ara[i] = odd.front();
          odd.pop_front();
          cnto++;
          res++;
        } else
          ans = false;
      }
    }
  }
  if (!ans) {
    printf("-1\n");
    return 0;
  }
  if (cnte > cnto) {
    cnte = abs(cnte - cnto) / 2;
    cnto = 0;
  } else {
    cnto = abs(cnte - cnto) / 2;
    cnte = 0;
  }
  res += cnte;
  res += cnto;
  for (long long i = 1; i <= n; i++) {
    if (ara[i] % 2 == 0 && cnte) {
      if (odd.size()) {
        cnte--;
        ara[i] = odd.front();
        odd.pop_front();
      } else
        ans = false;
    } else if (ara[i] % 2 && cnto) {
      if (even.size()) {
        cnto--;
        ara[i] = even.front();
        even.pop_front();
      } else
        ans = false;
    }
  }
  if (!ans)
    printf("-1\n");
  else {
    printf("%lld\n", res);
    for (long long i = 1; i <= n; i++) printf("%lld ", ara[i]);
    printf("\n");
  }
  return 0;
}
