#include <bits/stdc++.h>
using namespace std;

int main(){
  int x,b;
  cin >> x;
  if(x%100==0){
  b =100;
  }
  else{
  for(int i=0;i<1001;i++){
   if(0<i*100-x && i*100-x < 100){
    b=i*100-x;
   break;
   }
  }
  }
  cout << b << endl;
  return 0;
}
#include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <string>

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (a); i > (b); i--)
#define ALL(a) (a).begin(), (a).end()

int main() {
    int X;
    cin >> X;
    cout << 100 - X % 100 << endl;
    return 0;
}