#include <bits/stdc++.h>

using namespace std;

#define nline "\n"
#define ff first
#define ss second
#define ll long long
#define pb push_back

void solve() {
    int n;
    cin >> n;
    int sum = 0;
    for (int i = 1; i <= n; ++i) {
        sum += i;
        if (sum >= n) {
            cout << i;
            break;
        }
    }
}
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    // int t;
    // cin >> t;
    // while (t--)
    solve();
}

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <cstdint>
#include <vector>
using namespace std;

int main(){
    long long n;
    cin>>n;
    long long ans=0.5*(-1+sqrt(1+8*n));
    if(ans*(ans+1)<2*n){
        ans+=1;
    }
    cout<<ans;
    
    
    
}
