/**

▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
 In the name of Allah

       _           _
      / /         \ \
     / / _   _   _ \ \
    < < (_) (_) (_) > >
     \ \           / /
      \_\         /_/

  Nerede Gitsen Çukur Orda

**/

#include<bits/stdc++.h>
#include<fstream>
///#include<conio.h>
///#include "windows.h"
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define fr first
#define sc second
#define Qodirov_Kamoliddin ios_base::sync_with_stdio(0) ; cin.tie(NULL) ; cout.tie(NULL) ;
#define p_b pop_back
#define p_f pop_front
#define quluq return 0;
#define NO cout << "NO" << endl ;
#define no cout << "no" << endl ;
#define YES cout << "YES" << endl ;
#define yes cout << "yes" << endl ;

using namespace std ;

    const ll N = 1e9 + 7 ;

ll n , k , cnt , ans , sum ;

void vkoshp()
{
    cin >> n ;
    cnt = n % 100 ;
    ans = 100 - cnt ;
    cout << ans << endl ;
}

int main ()
{
    /*
    freopen("input.txt", "r", stdin );
    freopen("output.txt", "w", stdout );
    */
    Qodirov_Kamoliddin
    ///Author of the Greatest code : Murtazoev Alijon
    ///4294967295
    ll Qu_l_uQ = 1 ;
    // cin >> Qu_l_uQ ;
    while ( Qu_l_uQ -- )
        vkoshp() ;
}
///MaaN studios
///Eco students

#pragma GCC optimize("O3")
#pragma GCC target("popcnt")
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define ll long long

void fillPrefixSum(int arr[], int n, int prefixSum[]) // a[i-1,j-1] = a[j-1] - a[i-2];
{
    prefixSum[0] = arr[0];
    // Adding present element
    // with previous element
    for (int i = 1; i < n; i++)
        prefixSum[i] = prefixSum[i - 1] + arr[i];
}

void solve()
{
    ll n;
    cin >> n;
    ll sum = 0;
    for (ll i = 1; i <= n; i++)
    {
        sum += i;
        if (sum >= n)
        {
            cout << i << endl;
            return;
        }
    }
}

int main()
{
    fast

        int t = 1;
    //	cin >> t;
    while (t--)
    {

        solve();
    }
    return 0;
}
