#include <bits/stdc++.h>
using namespace std;
int x[111111], s[20][555555];
const int INF = 262144;
inline int gmin(register int a, register int b) { return a < b ? a : b; }
inline int calc(register int x) {
  if (!x) return 0;
  int r = 1;
  for (; x -= x & -x; r++)
    ;
  return r;
}
int main() {
  int n, i, k, t, le = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
    le = gmin(le, x[i]);
  }
  for (k = 1; k <= 18; k++) {
    int *z = s[k], S = 1 << k;
    for (i = 1; i <= n; i++) z[(x[i] + INF) % S] = 1;
    for (i = 1; i <= S; i++) z[i] += z[i - 1];
  }
  int res = 18, bon = 1 << 17, gut = (1 << 17) - 1, T;
  for (i = -le; i < 1 << 18; i++) {
    T = 0;
    for (k = 1; k <= 18; k++)
      if (s[k][(1 << k) - 1 - i % (1 << k)] -
          s[k][(1 << k - 1) - 1 - i % (1 << k)])
        T |= 1 << k - 1;
    if (calc(T | i) < res) {
      res = calc(T | i);
      bon = (T | i) ^ i;
      gut = i;
    }
  }
  printf("%d\n", res);
  for (i = 0; i <= 17; i++) {
    if (bon & (1 << i)) printf("%d ", 1 << i);
    if (gut & (1 << i)) printf("%d ", -(1 << i));
  }
  return 0;
}
