#include <bits/stdc++.h>
using namespace std;
int n, ans, cnt, a[100010], way[30], best[30];
inline void change() {
  int tmp = n;
  n = 0;
  a[0] = 0;
  for (int i = (1); i <= (tmp); i++)
    if (a[i] && a[i] != a[n]) a[++n] = a[i];
}
inline void dfs(int k) {
  if (cnt >= ans) return;
  if (!n) {
    ans = cnt;
    for (int i = (1); i <= (cnt); i++) best[i] = way[i];
    return;
  }
  if (n == 1 && abs(a[1]) == 1) {
    if (a[1] == 1)
      way[++cnt] = 1 << k;
    else
      way[++cnt] = -(1 << k);
    n--;
    dfs(k + 1);
    cnt--;
    n++;
    return;
  }
  int b[100010];
  int m = n, flag = 0;
  for (int i = (1); i <= (n); i++) b[i] = a[i];
  for (int i = (1); i <= (n); i++)
    if (abs(a[i]) & 1) flag = 1;
  if (!flag) {
    for (int i = (1); i <= (n); i++) a[i] /= 2;
    dfs(k + 1);
  } else {
    way[++cnt] = 1 << k;
    for (int i = (1); i <= (n); i++) {
      if (abs(a[i]) & 1) a[i]--;
      a[i] /= 2;
    }
    change();
    dfs(k + 1);
    cnt--;
    n = m;
    for (int i = (1); i <= (n); i++) a[i] = b[i];
    way[++cnt] = -(1 << k);
    for (int i = (1); i <= (n); i++) {
      if (abs(a[i]) & 1) a[i]++;
      a[i] /= 2;
    }
    change();
    dfs(k + 1);
    cnt--;
  }
  n = m;
  for (int i = (1); i <= (n); i++) a[i] = b[i];
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i <= (n); i++) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + n);
  change();
  ans = 20;
  dfs(0);
  printf("%d\n", ans);
  for (int i = (1); i <= (ans); i++) printf("%d ", best[i]);
  return 0;
}
