#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
map<int, int> mp;
vector<int> f;
bool v[maxn];
int s[maxn];
int main() {
  int n, m, i, j, u, t = 0;
  int a, b;
  a = b = 0;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%d", &u);
    if (mp.find(u) != mp.end()) {
      f.push_back(i);
      continue;
    }
    if (u & 1) {
      if (a * 2 < n) {
        mp[u]++;
        a++;
        s[i] = u;
        if (u < maxn) v[u] = 1;
      } else
        f.push_back(i);
    } else {
      if (b * 2 < n) {
        mp[u]++;
        b++;
        s[i] = u;
        if (u < maxn) v[u] = 1;
      } else
        f.push_back(i);
    }
  }
  j = 0;
  t = f.size();
  for (i = 1; i <= m && j < t; i++) {
    if (v[i]) continue;
    if ((i & 1) && a * 2 < n) {
      s[f[j++]] = i;
      a++;
    }
    if (!(i & 1) && b * 2 < n) {
      s[f[j++]] = i;
      b++;
    }
  }
  if (a + b < n)
    printf("-1\n");
  else {
    printf("%d\n", t);
    for (i = 0; i < n; i++) printf("%d%c", s[i], " \n"[i == n - 1]);
  }
  return 0;
}
