#include<bits/stdc++.h>
#define Woody
#ifdef Woody
#define quick ios::sync_with_stdio(0);cin.tie(0);
#else
#define quick
#endif
#define int long long
#define rep(n) for(int i=0;i<n;i++)
#define max3(a,b,c) max(max(a,b),c)
#define min3(a,b,c) min(min(a,b),c)
#define mp make_pair
#define vi vector<int>
#define eb emplace_back 
#define F first
#define S second
using namespace std;
signed main(){
	quick	
	int X;
	while(cin>>X){
		int k=X/100+1;
		cout<<k*100-X<<"\n";
	}
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

int main() {
  ll n;
  cin>>n;
  set<ll> st;
  for(ll a = 2; a * a <= n; a++) {
      for(ll b = a * a; b <= n; b *= a) {
          st.insert(b);
      }
  }
  cout<<n - (ll)st.size();
}