#include <bits/stdc++.h>
using namespace std;
struct Number {
  int sign;
  int value;
  Number(int x) : sign(x < 0 ? -1 : +1), value(abs(x)) {}
  void Add(int v) { value += v * sign; }
  bool operator<(const Number& rhs) const {
    if (value == rhs.value) {
      return sign < rhs.sign;
    }
    return value < rhs.value;
  }
};
vector<int> active_bits, min_bits(30, 30);
vector<Number> Shrink(const vector<Number>& numbers) {
  vector<Number> new_numbers[2];
  for (auto itr : numbers) {
    itr.value /= 2;
    int x = max(0, itr.sign);
    if (itr.value) {
      if (new_numbers[x].size() == 0 or
          (new_numbers[x].size() and new_numbers[x].back() < itr)) {
        new_numbers[x].push_back(itr);
      }
    }
  }
  new_numbers[0].insert(new_numbers[0].end(), new_numbers[1].begin(),
                        new_numbers[1].end());
  return new_numbers[0];
}
void Solve(int bit, vector<Number> numbers) {
  if (numbers.size() == 0) {
    if (min_bits.size() > active_bits.size()) {
      min_bits = active_bits;
    }
  }
  if (bit == 21) {
    return;
  }
  bool got_one = false;
  for (auto& itr : numbers) {
    got_one |= itr.value & 1;
  }
  if (not got_one) {
    Solve(bit + 1, Shrink(numbers));
  } else {
    for (auto value : {1, -1}) {
      auto a = numbers;
      active_bits.push_back(value * (1 << (bit)));
      for (auto& itr : a) {
        if (itr.value & 1) {
          itr.Add(-value);
        }
      }
      Solve(bit + 1, Shrink(a));
      active_bits.pop_back();
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<Number> numbers;
  for (int i = 0; i < n; i += 1) {
    int x;
    cin >> x;
    if (x) {
      numbers.push_back(x);
    }
  }
  sort(numbers.begin(), numbers.end());
  Solve(0, numbers);
  cout << min_bits.size() << '\n';
  for (auto itr : min_bits) {
    cout << itr << ' ';
  }
  cout << '\n';
}
