#include<iostream>
#include<vector>
using namespace std;
int main()
{
  
  int X;
  cin >>X;
  int A= X%100;
  cout <<100-A;
  
    
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define vi vector<int>
#define vll vector<ll>
#define vstr vector<string>

#define PI 2*acos(0.0)
#define test ll tc;cin>>tc; while(tc--){solve();}
#define MAX3(a,b,c) max(a,max(b,c))
#define MIN3(a,b,c) min(a,min(b,c))
#define MAX   99999999
#define INF   1<<30
#define EPS   1e-9
#define MOD   1000000007
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

void solve()
{
	int n;
	cin >> n;
	int ans;
	//if(n%100==0)
	ans = ((n / 100) + 1) * 100;
	ans = ans - n;
	cout << ans << endl;

}

int main()
{
	faster;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	solve();
	return 0;
}