#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const long long N = 100005;
long long now, ans = 1e9, Ans[29], num[29];
long long a[N], n;
long long b[29][N];
void dfs(long long x, long long n) {
  if (n == 0) {
    if (now < ans) {
      ans = now;
      for (long long i = 1; i <= now; ++i) Ans[i] = num[i];
    }
    return;
  }
  if (x > 20) return;
  if (now >= ans) return;
  long long bin1 = 0;
  for (long long i = 1; i <= n; ++i) b[x][i] = a[i], bin1 |= (a[i] & 1);
  if (bin1 == 0) {
    long long m = 0;
    for (long long i = 1; i <= n; ++i)
      if (a[i] && (a[m] != (a[i] >> 1))) a[++m] = (a[i] >> 1);
    dfs(x + 1, m);
  } else {
    long long m;
    for (long long i = -1; i <= 1; i += 2) {
      m = 0;
      num[++now] = i * (1LL << x);
      for (long long j = 1; j <= n; ++j)
        if ((a[j] & 1) == 0) {
          if (a[j] && (a[m] != (a[j] >> 1))) a[++m] = (a[j] >> 1);
        } else {
          if (((a[j] - i) >> 1) && (a[m] != ((a[j] - i) >> 1)))
            a[++m] = ((a[j] - i) >> 1);
        }
      dfs(x + 1, m);
      --now;
      for (long long j = 1; j <= n; ++j) a[j] = b[x][j];
    }
  }
}
signed main() {
  n = read();
  for (long long i = 1; i <= n; ++i) a[i] = read();
  sort(a + 1, a + n + 1);
  dfs(0, n);
  printf("%lld\n", ans);
  for (long long i = 1; i <= ans; ++i) printf("%lld ", Ans[i]);
  return 0;
}
