#include <bits/stdc++.h>
using namespace std;
vector<int> V;
int n;
vector<int> find(vector<int> v) {
  vector<int>::iterator it = unique(v.begin(), v.end());
  v.erase(it, v.end());
  int x = (it - v.begin());
  vector<int> g, ans;
  bool f = 1;
  if (x == 1 && v[0] == 0) {
    return ans;
  }
  if (x == 1 && abs(v[0]) == 1) {
    ans.push_back(v[0]);
    return ans;
  }
  for (int i = 0; i < x; i++) {
    if (v[i] % 2) {
      f = 0;
      break;
    }
  }
  if (f) {
    for (int i = 0; i < x; i++) v[i] = (v[i] / 2);
    g = find(v);
    for (int i = 0; i < g.size(); i++) g[i] = (g[i] * 2);
    return g;
  }
  int sz = -1;
  for (int ch = -1; ch <= 1; ch += 2) {
    for (int i = 0; i < x; i++) {
      if (v[i] % 2)
        g.push_back((v[i] - ch) / 2);
      else if (v[i] != 0)
        g.push_back(v[i] / 2);
    }
    if (ch == -1)
      ans = find(g);
    else {
      vector<int> p = find(g);
      if (p.size() < ans.size()) {
        ans = p;
        sz = 1;
      }
    }
    g.clear();
  }
  for (int i = 0; i < ans.size(); i++) {
    ans[i] = (ans[i]) * 2;
  }
  ans.push_back(sz);
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    V.push_back(x);
  }
  sort(V.begin(), V.end());
  vector<int> ans = find(V);
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) printf("%d ", ans[i]);
  return 0;
}
