#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[200005];
int odd, even, oddcnt, evencnt;
set<int> st;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (st.count(a[i]))
      a[i] = -1;
    else {
      st.insert(a[i]);
      if (a[i] & 1)
        oddcnt++;
      else
        evencnt++;
    }
  }
  int odd = 1, even = 2;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == -1) {
      if (oddcnt < evencnt) {
        while (odd <= m && st.count(odd)) odd += 2;
        if (odd > m) return cout << -1 << endl, 0;
        a[i] = odd;
        oddcnt++;
        st.insert(a[i]);
      } else {
        while (even <= m && st.count(even)) even += 2;
        if (even > m) return cout << -1 << endl, 0;
        a[i] = even;
        evencnt++;
        st.insert(a[i]);
      }
      ans++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (oddcnt < evencnt && (a[i] & 1) == 0) {
      while (odd <= m && st.count(odd)) odd += 2;
      if (odd > m) return cout << -1 << endl, 0;
      a[i] = odd;
      st.insert(a[i]);
      oddcnt++;
      evencnt--;
      ans++;
    } else if (oddcnt > evencnt && (a[i] & 1)) {
      while (even <= m && st.count(even)) even += 2;
      if (even > m) return cout << -1 << endl, 0;
      a[i] = even;
      st.insert(a[i]);
      oddcnt--;
      evencnt++;
      ans++;
    }
  }
  cout << ans << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
