#include <bits/stdc++.h>
using namespace std;
inline int read() {
  register int x = 0, t = 1;
  register char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') t = -1, ch = getchar();
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - 48, ch = getchar();
  return x * t;
}
int n;
int a[120000];
vector<int> ans, st;
void Work(int x, vector<int> a) {
  if (st.size() >= ans.size()) return;
  if (x == 20) {
    ans = st;
    return;
  }
  bool fl = true;
  for (int i = 0; i < a.size(); ++i)
    if (a[i] & 1) {
      fl = false;
      break;
    }
  if (fl) {
    vector<int> b;
    for (int i = 0; i < a.size(); ++i) b.push_back(a[i] >> 1);
    b.erase(unique(b.begin(), b.end()), b.end());
    Work(x + 1, b);
  } else {
    vector<int> b;
    for (int i = 0; i < a.size(); ++i)
      if (a[i] & 1)
        b.push_back((a[i] - 1) >> 1);
      else
        b.push_back(a[i] >> 1);
    st.push_back(1 << x);
    b.erase(unique(b.begin(), b.end()), b.end());
    Work(x + 1, b);
    b.clear();
    st.pop_back();
    for (int i = 0; i < a.size(); ++i)
      if (a[i] & 1)
        b.push_back((a[i] + 1) >> 1);
      else
        b.push_back(a[i] >> 1);
    b.erase(unique(b.begin(), b.end()), b.end());
    st.push_back(-(1 << x));
    Work(x + 1, b);
    st.pop_back();
  }
}
int main() {
  n = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  sort(&a[1], &a[n + 1]);
  n = unique(&a[1], &a[n + 1]) - a - 1;
  for (int i = 0; i <= 20; ++i) ans.push_back(1 << i), ans.push_back(-(1 << i));
  vector<int> b;
  for (int i = 1; i <= n; ++i) b.push_back(a[i]);
  Work(0, b);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); ++i) printf("%d ", ans[i]);
  puts("");
  return 0;
}
