Little Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a trick on Chris.

There are exactly s blocks in Chris's set, each block has a unique number from 1 to s. Chris's teacher picks a subset of blocks X and keeps it to himself. He will give them back only if Chris can pick such a non-empty subset Y from the remaining blocks, that the equality holds: 

<image> "Are you kidding me?", asks Chris.

For example, consider a case where s = 8 and Chris's teacher took the blocks with numbers 1, 4 and 5. One way for Chris to choose a set is to pick the blocks with numbers 3 and 6, see figure. Then the required sums would be equal: (1 - 1) + (4 - 1) + (5 - 1) = (8 - 3) + (8 - 6) = 7.

<image>

However, now Chris has exactly s = 106 blocks. Given the set X of blocks his teacher chooses, help Chris to find the required set Y!

Input

The first line of input contains a single integer n (1 ≤ n ≤ 5·105), the number of blocks in the set X. The next line contains n distinct space-separated integers x1, x2, ..., xn (1 ≤ xi ≤ 106), the numbers of the blocks in X.

Note: since the size of the input and output could be very large, don't use slow output techniques in your language. For example, do not use input and output streams (cin, cout) in C++.

Output

In the first line of output print a single integer m (1 ≤ m ≤ 106 - n), the number of blocks in the set Y. In the next line output m distinct space-separated integers y1, y2, ..., ym (1 ≤ yi ≤ 106), such that the required equality holds. The sets X and Y should not intersect, i.e. xi ≠ yj for all i, j (1 ≤ i ≤ n; 1 ≤ j ≤ m). It is guaranteed that at least one solution always exists. If there are multiple solutions, output any of them.

Examples

Input

3
1 4 5


Output

2
999993 1000000

Input

1
1


Output

1
1000000 
#include <bits/stdc++.h>
using namespace std;
unsigned long long int MOD = 1000000007;
unsigned long long int B = 13331;
bool cmp(const int &a, const int &b) { return a < b; }
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
int lcm(int a, int b) { return a * (b / gcd(a, b)); }
int has[1000005];
vector<int> v;
bool visi[1000005];
int mover = 1;
int s;
int bsearch(int l, int r, int k) {
  int toret;
  while (1) {
    if (has[mover] == -1 && has[s - (mover - 1)] == -1) {
      toret = mover;
      mover++;
      break;
    } else
      ++mover;
  }
  return toret;
}
vector<int> ans;
int main() {
  int n;
  s = 1000000;
  int i, j, k, x;
  scanf("%d", &n);
  memset(has, -1, sizeof(has));
  memset(visi, 0, sizeof(visi));
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    v.push_back(x);
    has[x] = 0;
  }
  x = v.size();
  for (i = 0; i < x; i++) {
    int y = s - (v[i] - 1);
    if (!visi[v[i]]) {
      if (has[y] == -1) {
        ans.push_back(y);
        has[y] = 1;
        visi[v[i]] = 1;
      } else {
        int val = bsearch(1, 1000000, 0);
        y = s - (val - 1);
        ans.push_back(val);
        ans.push_back(y);
        has[y] = 1;
        has[val] = 1;
        visi[v[i]] = 1;
        visi[s - (v[i] - 1)] = 1;
      }
    }
  }
  printf("%d\n", ans.size());
  x = ans.size();
  for (i = 0; i < x; i++) printf("%d ", ans[i]);
  return 0;
}
