#include <bits/stdc++.h>
using std::unique;
using std::vector;
vector<int> v;
int a[100005], n;
vector<int> solve(int t) {
  if (t > 19) return vector<int>(0);
  int f = 0;
  for (auto &x : v)
    if (x & 1) f = 1;
  if (!f) {
    for (auto &x : v) x /= 2;
    return solve(t + 1);
  }
  vector<int> tmp = v;
  for (auto &x : v) {
    if (x & 1)
      x = (x - 1) / 2;
    else
      x /= 2;
  }
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<int> v1 = solve(t + 1);
  v = tmp;
  for (auto &x : v) {
    if (x & 1)
      x = (x + 1) / 2;
    else
      x /= 2;
  }
  v.erase(unique(v.begin(), v.end()), v.end());
  vector<int> v2 = solve(t + 1);
  v1.push_back(1 << t), v2.push_back(-(1 << t));
  return v1.size() < v2.size() ? v1 : v2;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  std::sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) v.push_back(a[i]);
  v = solve(0);
  printf("%d\n", v.size());
  for (auto j : v) printf("%d ", j);
}
