#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> dfs(vector<int> nu, int dep) {
  if (dep == 19) return vector<int>(0);
  bool f = 0;
  for (int i = 0; i < nu.size(); i++)
    if (nu[i] & 1) f = 1;
  if (!f) {
    for (int i = 0; i < nu.size(); i++) nu[i] >>= 1;
    return dfs(nu, dep + 1);
  }
  vector<int> tmp = nu;
  for (int i = 0; i < tmp.size(); i++)
    if (tmp[i] & 1)
      tmp[i] = (tmp[i] + 1) >> 1;
    else
      tmp[i] >>= 1;
  sort(tmp.begin(), tmp.end());
  tmp.resize(unique(tmp.begin(), tmp.end()) - tmp.begin());
  vector<int> ans1 = dfs(tmp, dep + 1);
  tmp = nu;
  for (int i = 0; i < tmp.size(); i++)
    if (tmp[i] & 1)
      tmp[i] = (tmp[i] - 1) >> 1;
    else
      tmp[i] >>= 1;
  sort(tmp.begin(), tmp.end());
  tmp.resize(unique(tmp.begin(), tmp.end()) - tmp.begin());
  vector<int> ans2 = dfs(tmp, dep + 1);
  ans1.push_back(-(1 << dep));
  ans2.push_back((1 << dep));
  if (ans1.size() < ans2.size()) return ans1;
  return ans2;
}
int main() {
  vector<int> nu;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    nu.push_back(x);
  }
  vector<int> ans = dfs(nu, 0);
  printf("%d\n", ans.size());
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
