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;
const long long MOD = 1e9 + 7;
const long long INF = 4e18;
const long long MAX = 1e5;
const long double PI = 3.14159265358979323846;
bool IN_RANGE(pair<long long, long long> v, long long n, long long m,
              long long d) {
  return v.first >= d && v.first <= n && v.second >= d && v.second <= m;
}
bool IN_R(long long x, long long n, long long d) { return x >= d && x <= n; }
long long MA = -INF, MI = INF;
long long C2I(char x, char base) { return x - base; }
void PAIROUT(pair<long long, long long> x) {
  cout << x.first << " " << x.second;
}
long long PO(long long x, long long y) {
  if (y == 0) return 1;
  long long ans = PO(x, y / 2);
  ans *= ans, ans %= MOD;
  if (y % 2 == 1) ans *= x, ans %= MOD;
  return ans % MOD;
}
void RE(long long x) {
  x %= MOD;
  if (x < 0) x += MOD;
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0),
      cout << fixed << setprecision(10);
  long long n;
  cin >> n;
  if (n < 10)
    cout << 1;
  else {
    long long k = n, cnt = 0;
    while (k >= 10) k /= 10, cnt++;
    long long w;
    long long a = PO(10, cnt);
    if (k < 9)
      w = (k + 1) * a - n;
    else
      w = (a * 10) - n;
    cout << w;
  }
  return 0;
}