#include <bits/stdc++.h>
int N, a[100000];
std::vector<int> F(std::vector<int> req) {
  if (req == std::vector<int>({0})) return {};
  if (req == std::vector<int>({1}) || req == std::vector<int>({0, 1}))
    return {1};
  if (req == std::vector<int>({-1}) || req == std::vector<int>({-1, 0}))
    return {-1};
  if (std::all_of(req.begin(), req.end(), [](int x) { return (x & 1) == 0; })) {
    for (int &i : req) i >>= 1;
    std::vector<int> res = F(req);
    for (int &i : res) i <<= 1;
    return res;
  }
  std::vector<int> L = req, R = req;
  for (int &i : L) {
    if (i & 1) i--;
    i >>= 1;
  }
  for (int &i : R) {
    if (i & 1) i++;
    i >>= 1;
  }
  L.resize(std::unique(L.begin(), L.end()) - L.begin());
  R.resize(std::unique(R.begin(), R.end()) - R.begin());
  std::vector<int> Lres = F(L), Rres = F(R);
  for (int &i : Lres) i <<= 1;
  for (int &i : Rres) i <<= 1;
  Lres.push_back(1);
  Rres.push_back(-1);
  return Lres.size() < Rres.size() ? Lres : Rres;
}
int main() {
  scanf("%d", &N);
  for (int i = 0; i < N; i++) scanf("%d", a + i);
  std::sort(a, a + N);
  N = std::unique(a, a + N) - a;
  std::vector<int> res = F({a, a + N});
  printf("%d\n", int(res.size()));
  for (int i : res) printf("%d ", i);
  putchar(10);
  return 0;
}
