#include <iostream>
#include <vector>
using namespace std;

int main(){
    int X;
    cin >> X;

    int genzai = X / 100;
    //cout << "genzai " << genzai << endl;
    int ans = (genzai + 1)*100 - X;

    cout << ans << endl;

    
    return 0;
}
#include<bits/stdc++.h>
#include<iostream>
#define ll long long
#define rep(i,a) for(int i=0;i<a;i++)
#define int long long
#define di(a) int a;cin>>a;
#define dia di(a)
#define dix di(x)
#define diy di(y)
#define diz di(z)
#define dib di(b)
#define din di(n)
#define db double
#define all(x) x.begin(),x.end()
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
signed main()
{
    din
    int x=n%100;
  cout<<100-x;
    return 0;
}