#ifdef LOCAL
    cout<<"\nTime Elapsed: " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n";
#endif

#include "bits/stdc++.h"
using namespace std;

#define ll long long
#define vll vector<ll> 
#define pii pair<ll,ll> 
#define un_mp unordered_map<char,ll>
#define endl "\n"
#define pb push_back
#define all(a) a.begin(),a.end()

void solve(){
    ll a,b,n,tt,d,m,k;
    cin>>n;
    a=n;
    n/=100;
    cout<<(n+1)*100-a<<endl;
    return;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll a,b,c,n,tt,d,m,k,x,y;
    tt=1;
    //cin>>tt;                            
    while(tt--){
        solve();
    }
}
//always use
#include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for(int i=0; i<n; i++)
#define mp make_pair
#define pb push_back
#define f first
#define s second
typedef long long ll;
#define MOD 998244353

//2 147 483 647 (2^31-1) int max
//9 223 372 036 854 775 807 (2^63-1) ll max

//codeforces and USACO
void fast_io(){
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);}

//USACO
void file_io(string taskname){
  string fin = taskname + ".in";
  string fout = taskname + ".out";
  const char* FIN = fin.c_str();
  const char* FOUT = fout.c_str();
  freopen(FIN, "r", stdin);
  freopen(FOUT, "w", stdout);
  fast_io();}

//Printing pairs and vectors
template<typename A, typename B> ostream& operator<<(ostream &cout, pair<A, B> const &p) { return cout << "(" << p.f << ", " << p.s << ")"; }
template<typename A> ostream& operator<<(ostream &cout, vector<A> const &v) {
cout << "["; for(int i = 0; i < v.size(); i++) {if (i) cout << ", "; cout << v[i];} return cout << "]";}

//main code
int main(){
  fast_io();
  ll n;
  cin >> n;
  ll l=1,r=n+1; //l is <= answer, r > answer
  while(l+1<r){
    ll m=(l+r)/2;
    if (m > 1414213569LL || m*m>(2*(n+1)-m)){
      r=m;
    }
    else{
      l=m;
    }
  }
  //cout << l << "\n";
  cout << n-l+1;
}
