#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int ans = N, tp;
bool w[30][N];
int f[30][N], g[N], v[N];
inline int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
inline void dfs(int d, int n) {
  if (tp >= ans || d > 18) return;
  int *a = f[d], *b = f[d + 1];
  if (n == 1 && !a[1]) {
    ans = tp;
    for (int i = 1; i <= tp; i++) g[i] = v[i];
    return;
  }
  bool flg = 1;
  for (int i = 1; i <= n; i++)
    if (a[i] & 1) flg = 0;
  if (flg) {
    for (int i = 1; i <= n; i++) b[i] = a[i] / 2;
    dfs(d + 1, n);
    return;
  }
  for (int p = -1; p <= 1; p += 2) {
    for (int i = 1; i <= n; i++)
      if (a[i] & 1) a[i] -= p, w[d][i] = 1;
    for (int i = 1; i <= n; i++) b[i] = a[i] / 2;
    int m = unique(b + 1, b + 1 + n) - b - 1;
    v[++tp] = p * (1 << d), dfs(d + 1, m), --tp;
    for (int i = 1; i <= n; i++)
      if (w[d][i]) a[i] += p, w[d][i] = 0;
  }
}
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) f[0][i] = gi();
  sort(f[0] + 1, f[0] + 1 + n);
  n = unique(f[0] + 1, f[0] + 1 + n) - f[0] - 1;
  dfs(0, n);
  cout << ans << endl;
  for (int i = 1; i <= ans; i++) printf("%d ", g[i]);
  return 0;
}
