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;
string tout[4] = {"NO", "YES", "No", "Yes"};
using vi = vector<int>;
using vll = vector<long long>;
using vld = vector<long double>;
using vch = vector<char>;
using mi = map<int, int>;
using mll = map<long long, long long>;
using msll = map<string, long long>;
using mchll = map<char, long long>;
using sll = set<long long>;
using si = set<int>;
using pll = pair<long long, long long>;
const long long INF = 1e9 + 5;
const long long MOD = 1e5;
const long long ASO = 1e18 + 5;
const long long ANI = 1e6 + 5;
const long long inf = -1e9;
const long long mod = -1e5;
const long long aso = -1e18;
const long long ISM = 1e4 + 5;
long long n, a = 1;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  while (a * 10 <= n) {
    a *= 10;
  }
  for (int i = 1; i <= 1000; ++i) {
    if (a * i > n) {
      cout << abs(n - a * i);
      return 0;
    }
  }
  return 0;
}