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

int main() {
	
	int x;
	cin >> x;
	cout << 100 - x % 100 << '\n';
	return 0;
}
#include<cstdio>
#include<math.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#include<set>
#include<cstring>
#include<map>
 
 
using namespace std;
#define int long long int
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define mp make_pair
#define pb push_back
#define mod 1000000007
//#define mod 998244353

int X;
signed main(){
    scanf("%lld",&X);
    int ans=(int)(X/100+1)*100-X;
    printf("%lld\n",ans);
}