#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
int cnt[3];
int n, a[100009];
int main() {
  while (~scanf("%d", &n)) {
    int mi = INF;
    memset(cnt, 0, sizeof cnt);
    for (int i = 0; i < n; i++) scanf("%d", &a[i]), mi = min(mi, a[i]);
    for (int i = 0; i < n; i++) cnt[a[i] - mi]++;
    int tmp = min(cnt[0], cnt[2]);
    int ans1 = cnt[1] + max(cnt[0], cnt[2]) - tmp;
    int ans2 = cnt[1] % 2 + cnt[0] + cnt[2];
    if (ans1 >= ans2 && cnt[1] && cnt[2]) {
      cnt[0] += cnt[1] / 2;
      cnt[2] += cnt[1] / 2;
      cnt[1] %= 2;
      printf("%d\n", ans2);
    } else {
      cnt[1] += 2 * tmp;
      cnt[0] -= tmp, cnt[2] -= tmp;
      printf("%d\n", ans1);
    }
    int flag = 0;
    for (int i = 0; i < 3; i++) {
      for (int j = 0; j < cnt[i]; j++) {
        if (flag)
          printf(" ");
        else
          flag = 1;
        printf("%d", mi + i);
      }
    }
    printf("\n");
  }
  return 0;
}
