#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
    int n;
    cin>>n;
    int d=(n/100)*100+100;
    cout<<d-n<<endl;
}

#include <iostream>
#include <string>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <stack>
#include <queue>
#include <set>

#define mod 1000000007
#define mp make_pair
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main(){
    int x,a;
    cin>>x;
    a=x%100;
    if(a==0) cout << 100;
    else cout << 100-a;
    return 0;
}