#include <bits/stdc++.h>
const int kN = 100000 + 5;
int n, a[kN];
std::vector<int> best;
std::vector<int> hand;
void search(int at, const std::vector<int> &v, int bal) {
  if (hand.size() >= best.size()) return;
  if (std::accumulate(v.begin(), v.end(), 0) - v[bal] == 0) {
    best = hand;
    return;
  }
  bool odd = false;
  for (int i = 0; i < v.size(); ++i) odd |= v[i] && (i - bal) % 2;
  if (!odd) {
    int vbal = bal >> 1;
    std::vector<int> vv(bal + 1);
    for (int i = 0; i < v.size(); ++i) vv[(i - bal) / 2 + vbal] += v[i];
    search(at + 1, vv, vbal);
    return;
  }
  for (int c = -1; c <= 1; c += 2) {
    hand.emplace_back(c * (1 << at));
    int vbal = bal >> 1;
    std::vector<int> vv(bal + 1);
    for (int i = 0; i < v.size(); ++i) {
      int pos = (i - bal) % 2 == 0 ? (i - bal) / 2 : (i - bal - c) / 2;
      vv[pos + vbal] += v[i];
    }
    search(at + 1, vv, vbal);
    hand.pop_back();
  }
}
int main() {
  scanf("%d", &n);
  std::vector<int> b((1 << 20) + 1, 0);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    b[a[i] + (1 << 19)]++;
  }
  best.resize(100);
  search(0, b, 1 << 19);
  printf("%d\n", best.size());
  for (int i = 0; i < best.size(); ++i)
    printf("%d%c", best[i], " \n"[i + 1 == best.size()]);
}
