#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
set<int> s;
int a[maxn], b[maxn], num[2] = {0};
int main() {
  int n, m;
  cin >> n >> m;
  int half = n / 2;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (s.find(a[i]) != s.end() || num[a[i] & 1] >= half)
      b[cnt++] = i;
    else {
      s.insert(a[i]);
      num[a[i] & 1]++;
    }
  }
  int res = cnt;
  for (int i = 2; i <= m && num[0] < half && cnt > 0; i += 2) {
    if (s.find(i) == s.end()) {
      a[b[--cnt]] = i;
      s.insert(i);
      num[0]++;
    }
  }
  for (int i = 1; i <= m && num[1] < half && cnt > 0; i += 2) {
    if (s.find(i) == s.end()) {
      a[b[--cnt]] = i;
      s.insert(i);
      num[1]++;
    }
  }
  if (num[0] == half && num[1] == half && cnt == 0) {
    cout << res << endl;
    for (int i = 0; i < n - 1; i++) printf("%d ", a[i]);
    cout << a[n - 1] << endl;
  } else
    cout << -1 << endl;
  return 0;
}
