#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n, m, a[maxn], ji, ou, res;
set<int> st;
void godie() {
  puts("-1");
  exit(0);
}
int main() {
  scanf("%d%d", &n, &m);
  m = min(n << 2, m);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] & 1)
      ++ji;
    else
      ++ou;
    if (st.find(a[i]) != st.end()) {
      if (a[i] & 1)
        --ji;
      else
        --ou;
      a[i] = -1;
      continue;
    }
    st.insert(a[i]);
  }
  int pji = 1, pou = 2;
  for (int i = 0; i < n; ++i)
    if (a[i] == -1) {
      if (ji < ou) {
        while (st.find(pji) != st.end() && pji <= m) pji += 2;
        if (pji > m) godie();
        a[i] = pji, ++ji, ++res, pji += 2;
      } else {
        while (st.find(pou) != st.end() && pou <= m) pou += 2;
        if (pou > m) godie();
        a[i] = pou, ++ou, ++res, pou += 2;
      }
    }
  if (ji < ou) {
    for (int i = 0; i < n; ++i)
      if (!(a[i] & 1)) {
        while (st.find(pji) != st.end() && pji <= m) pji += 2;
        if (pji > m) godie();
        a[i] = pji, ++ji, --ou, ++res, pji += 2;
        if (ji == ou) break;
      }
  }
  if (ou < ji) {
    for (int i = 0; i < n; ++i)
      if (a[i] & 1) {
        while (st.find(pou) != st.end() && pou <= m) pou += 2;
        if (pou > m) godie();
        a[i] = pou, --ji, ++ou, ++res, pou += 2;
        if (ji == ou) break;
      }
  }
  printf("%d\n", res);
  for (int i = 0; i < n; ++i) printf("%d%c", a[i], i + 1 == n ? '\n' : ' ');
  return 0;
}
