#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
struct res {
  int s[2];
  int score() const {
    return __builtin_popcount(s[0]) + __builtin_popcount(s[1]);
  }
  bool operator<(const res &other) const { return score() < other.score(); }
};
res solve(const set<ll> &vals, int depth) {
  if (depth == 20) return res{{0, 0}};
  set<ll> inner;
  bool ok = true;
  for (const auto &v : vals) {
    ok &= (v & 1) == 0;
  }
  if (ok) {
    for (const auto &v : vals) {
      inner.insert(v / 2);
    }
    res r = solve(inner, depth + 1);
    return res{{2 * r.s[0], 2 * r.s[1]}};
  }
  res best = res{{numeric_limits<int>::max(), numeric_limits<int>::max()}};
  for (int u = 0; u < 2; u++) {
    int sign = 2 * u - 1;
    inner.clear();
    for (const auto &v : vals) {
      inner.insert((v + sign * (v & 1)) / 2);
    }
    res r = solve(inner, depth + 1);
    res s{{2 * r.s[0] + (u == 1), 2 * r.s[1] + (u == 0)}};
    best = min(best, s);
  }
  return best;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n;
  cin >> n;
  set<ll> a;
  for (int i = 0; i < n; i++) {
    ll v;
    cin >> v;
    a.insert(v);
  }
  a.insert(0);
  res r = solve(a, 0);
  cout << r.score() << '\n';
  for (int i = 0; i < 20; i++) {
    for (int u = 0; u < 2; u++) {
      int sign = 2 * u - 1;
      if (((r.s[u] >> i) & 1) == 0) continue;
      cout << sign * (1 << i) << " ";
    }
  }
  cout << endl;
}
