Problem: Apart from having lots of holidays throughout the year, residents of Berland also have whole lucky years. Year is considered lucky if it has no more than 1 non-zero digit in its number. So years 100, 40000, 5 are lucky and 12, 3001 and 12345 are not.

You are given current year in Berland. Your task is to find how long will residents of Berland wait till the next lucky year.

Input

The first line contains integer number n (1 ≤ n ≤ 109) — current year in Berland.

Output

Output amount of years from the current year to the next lucky one.

Examples

Input

4


Output

1


Input

201


Output

99


Input

4000


Output

1000

Note

In the first example next lucky year is 5. In the second one — 300. In the third — 5000.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
map<long long int, long long int> mp1, mp2;
map<long long int, long long int> vis;
map<long long int, long long int> pos;
map<long long int, long long int> vis_s;
map<pair<long long int, long long int>, long long int> vis12;
priority_queue<long long int> pq;
priority_queue<long long int> pq2;
vector<long long int> vec;
vector<long long int> vec_s;
queue<long long int> vec1;
long long int ara[1000006], ara2[1000006];
void seive() {
  for (long long int i = 2; i * i <= 1000000; i++) {
    if (vis_s[i] == 0) {
      for (long long int j = i * i; j <= 1000000; j += i) vis_s[j] = 1;
    }
  }
  for (long long int i = 1; i <= 1000000; i++) {
    if (vis_s[i] == 0) vec_s.push_back(i);
  }
}
void save() {
  long long int sum = 1, m = 1;
  for (long long int i = 1;; i++) {
    m *= 2;
    sum += m;
    vec.push_back(sum);
    if (sum > 1000000000) {
      break;
    }
  }
}
int main() {
  long long int n, item, no;
  scanf("%lld", &no);
  long long int no1 = no;
  if (no <= 9)
    cout << "1" << endl;
  else {
    long long int m = 1;
    while (no > 9) {
      no /= 10;
      m *= 10;
    }
    m = m * (no + 1) - no1;
    cout << m << endl;
  }
  return 0;
}