#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[200010];
set<int> ahas;
int odd, even;
int main() {
  scanf("%d%d", &n, &m);
  ahas.clear();
  odd = 0;
  even = 0;
  int t, cnt = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &t);
    if (ahas.count(t) == 0) {
      if (t & 1 && odd < (n >> 1)) {
        ahas.insert(t);
        a[i] = t;
        odd++;
      }
      if (t % 2 == 0 && even < (n >> 1)) {
        ahas.insert(t);
        a[i] = t;
        even++;
      }
    }
  }
  cnt = odd + even;
  int jo = 0, je = 1;
  bool flag = true;
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) {
      if (odd < even) {
        while (1) {
          t = jo << 1 | 1;
          if (t > m) break;
          if (ahas.count(t) == 0) break;
          jo++;
        }
        if (t > m) {
          flag = false;
          break;
        }
        a[i] = t;
        odd++;
        jo++;
      } else {
        while (1) {
          t = je << 1;
          if (t > m) break;
          if (ahas.count(t) == 0) break;
          je++;
        }
        if (t > m) {
          flag = false;
          break;
        }
        a[i] = t;
        even++;
        je++;
      }
    }
  }
  if (!flag)
    printf("-1\n");
  else {
    printf("%d\n", n - cnt);
    for (int i = 1; i <= n; i++) printf("%d ", a[i]);
    printf("\n");
  }
  return 0;
}
