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

int main() {
     double n;
     cin>>n;
     
     n=sqrt(8*n+1);
     n=(n-1)/2;
     
     int x=n;
     if(n>x)
     x++;
     cout<<x<<endl;
}

#include <iostream>
#include <bits/stdc++.h>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <set>
using namespace std;
int main(){
  int n;
  cin >> n;
  int pb = 1;
  int add = 2;
  for(int i = 1; i <= n; i++){
  if(pb >= n){
    cout << i;
    break;
  }else {
 pb = pb + add;
 add++;
  }
  }
}