#include <bits/stdc++.h>
using namespace std;
int p[22], a[100005], r[22][100005], k = 0, m, n, i, j, ans, res, t;
bool b[22][1050000], neg = false;
vector<int> v;
bool proveri(vector<int> v, int x) {
  int i;
  for (i = 0; i < v.size(); i++) {
    if (v[i] == x) return false;
  }
  return true;
}
void resi(int x) {
  int x1, y1, x2, y2, i;
  r[x][k] = INT_MAX;
  x1 = lower_bound(r[x], r[x] + k, p[x - 1]) - r[x];
  y1 = k;
  x2 = k;
  y2 = k;
  if (y1 - x1 > 0) b[x][0] = true;
  for (i = 1; i < p[x]; i++) {
    while (x1 > 0 && r[x][x1 - 1] >= p[x - 1] - i) {
      x1--;
    }
    while (y1 > 0 && r[x][y1 - 1] >= p[x] - i) {
      y1--;
    }
    while (x2 > 0 && r[x][x2 - 1] >= p[x - 1] - i + p[x]) {
      x2--;
    }
    while (y2 > 0 && r[x][y2 - 1] >= 2 * p[x] - i) {
      y2--;
    }
    if (y1 - x1 > 0 || y2 - x2 > 0)
      b[x][i] = true;
    else
      b[x][i] = false;
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  p[0] = 1;
  m = -1050000;
  for (i = 1; i < 22; i++) {
    p[i] = 2 * p[i - 1];
  }
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > m) m = a[i];
  }
  if (m <= 0) {
    m = -1050000;
    neg = true;
    for (i = 0; i < n; i++) {
      a[i] = -a[i];
      if (a[i] > m) m = a[i];
    }
  }
  for (i = 0; i < n; i++) {
    if (a[i] != m) {
      for (j = 1; j <= 21; j++) {
        r[j][k] = (m - a[i]) % p[j];
      }
      k++;
    }
  }
  for (i = 1; i <= 21; i++) {
    sort(r[i], r[i] + k);
  }
  for (i = 1; i <= 20; i++) {
    resi(i);
  }
  int x, y;
  ans = 1050000;
  for (i = m; i <= p[20]; i++) {
    x = y = 0;
    x = i - m;
    for (j = 1; j <= 20; j++) {
      if (b[j][x % p[j]]) y += p[j - 1];
    }
    x = y | i;
    x = x | (i - m);
    y = 0;
    for (j = 1; j <= 20; j++) {
      if (x % p[j] - x % p[j - 1] != 0) y++;
    }
    if (y < ans) {
      ans = y;
      res = i;
      t = x;
    }
  }
  for (j = 1; j <= 20; j++) {
    if (res % p[j] - res % p[j - 1] != 0) v.push_back(p[j - 1]);
  }
  for (j = 1; j <= 20; j++) {
    if (t % p[j] - t % p[j - 1] != 0 && proveri(v, p[j - 1]))
      v.push_back(-p[j - 1]);
  }
  cout << v.size() << endl;
  for (i = 0; i < v.size(); i++) {
    if (!neg)
      cout << v[i] << " ";
    else
      cout << -v[i] << " ";
  }
  return 0;
}
