#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
int n, m, ans;
int a[MAXN];
set<int> S;
int odd, even;
int o = 1, e = 2;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (S.count(a[i]))
      a[i] = -1;
    else {
      S.insert(a[i]);
      if (a[i] % 2 == 0)
        even++;
      else
        odd++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == -1) {
      if (even > odd) {
        while (S.count(o)) o += 2;
        if (o > m) {
          cout << "-1" << endl;
          return 0;
        }
        a[i] = o;
        S.insert(o);
        odd++;
        ans++;
      } else {
        while (S.count(e)) e += 2;
        if (e > m) {
          cout << "-1" << endl;
          return 0;
        }
        a[i] = e;
        S.insert(e);
        even++;
        ans++;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[i] % 2 == 0 && even > odd) {
      while (S.count(o)) o += 2;
      if (o > m) {
        cout << "-1" << endl;
        return 0;
      }
      a[i] = o;
      S.insert(o);
      odd++;
      even--;
      ans++;
    } else if (a[i] % 2 != 0 && odd > even) {
      while (S.count(e)) e += 2;
      if (e > m) {
        cout << "-1" << endl;
        return 0;
      }
      a[i] = e;
      S.insert(e);
      even++;
      odd--;
      ans++;
    }
  }
  cout << ans << endl;
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
