#include <bits/stdc++.h>
using namespace std;
void prt(int x, char c = '\n') {
  printf("%d", x);
  printf("%c", c);
}
void prt(char x, char c = '\n') {
  printf("%c", x);
  printf("%c", c);
}
void prt(char* x, char c = '\n') {
  printf("%s", x);
  printf("%c", c);
}
void prt(long long x, char c = '\n') {
  cout << x;
  printf("%c", c);
}
int main() {
  int n;
  cin >> n;
  long long a[n];
  int dp[n];
  int count[64] = {0};
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    long long x = a[i];
    x = (((x ^ (x - 1)) + 1) >> 1);
    int cnt = 0;
    while (x) {
      cnt++;
      x = x >> 1;
    }
    dp[i] = cnt;
    count[dp[i]]++;
  }
  int mx = 0;
  int ind = -1;
  for (int i = 0; i < 64; i++) {
    if (count[i] > mx) {
      mx = count[i];
      ind = i;
    }
  }
  prt(n - mx);
  for (int i = 0; i < n; i++) {
    if (dp[i] != ind) {
      prt(a[i], ' ');
    }
  }
  return 0;
}
