#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define rep(i,a,b) for (int i = (int)(a); i < (int)(b); i++)



int main(){
    
    ll N; cin >> N;
    ll A = 1e6;
    ll tmp = 0;
    rep(i,1,A){
        tmp += i;
        if(tmp >= N){
            cout << i << endl;
            break;
        }
    }

}
    

    

// code by lynmisakura.wish to be accepted!
#include<bits/stdc++.h>
using namespace std;

#define REP(i,N) for(int i = 0;i < N;i++)
using ll = long long;
using db = long double;

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

#define lb(x,k) lower_bound(all(x),k)
#define ub(x,k) upper_bound(all(x),k)

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define ins insert

#define rtn return
#define re0 return 0
#define ex0 exit(0)

using vi = vector<int>;
using vl = vector<ll>;
using pi = pair<int,int>;
using pl = pair<ll,ll>;
using vpi = vector<pi>;
using vpl = vector<pl>;

template<class T> bool chmin(T& a,T b){
  if(a > b){ a = b;return true; }else{ return false; }
}
template<class T> bool chmax(T& a,T b){
  if(a < b){ a = b;return true; }else{ return false; }
}
template<class T> int bppc(T n){
  return __builtin_popcountll(n);
}
template<class T> bool ms_erase(std::multiset<T>& ms,T key){
  auto it = ms.find(key);
  if(*it == key){ ms.erase(it); return true; }else{ return false; }
}
template<class T> bool s_erase(std::set<T>& s,T key){
  auto it = s.find(key);
  if(*it == key){ s.erase(it); return true; }else{ return false; }
}
template<class T> vector<T> compression(vector<T>& a,T off = 0){
  vector<T> b = a;sort(all(b));b.erase(unique(all(b)),b.end());
  vector<T> res = a;REP(i,a.size())res[i] = lb(b,res[i]) - b.begin() + off;
  return res;
}
#define debug(arr) std::cout << #arr << " = " << arr << '\n'
#define debug2(a,b) std::cout<<"["<<#a<<","<<#b<<"] = "<<"["<<a<<","<<b<<"]\n"
#define debug3(a,b,c) std::cout<<"["<<#a<<","<<#b<<","<<#c<<"] = "<<"["<<a<<","<<b<<","<<c<<"]\n"
template<class T> std::ostream &operator << (std::ostream& out, const std::vector<T>& arr) {
  std::cout << "{"; for (int i = 0; i < arr.size(); i++)std::cout << (!i ? "" : ", ") << arr[i]; std::cout << "}";
  return out;
}
template<class T> std::ostream &operator << (std::ostream& out, const std::vector<std::vector<T> >& arr) {
  std::cout << "{\n"; for (auto& vec : arr)std::cout << "  " << vec << ",\n"; std::cout << "}";
  return out;
}
template<class S,class T> std::ostream &operator << (std::ostream& out, const std::pair<S,T>& p){
  std::cout << "{" << p.first << "," << p.second << "}" << '\n';
  return out;
}
template<class T> std::istream &operator >> (std::istream& in, std::vector<T>& arr) {
  for (auto& i : arr) std::cin >> i; return in;
}
template<class S,class T> std::istream &operator >> (std::istream& in,std::pair<S,T>& p){
  std::cin >> p.first >> p.second; return in;
}
template<class T> void debug_a(T *a , int N){
  std::cout << "debug array : {";
  for(int i = 0;i < N;i++){
    std::cout << *(a + i) << (i < N-1 ? ", " : "}\n");
  }
}


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  ll n;cin >> n;
  ll tmp = 0;
  for(int i = 1;i <= 1000000;i++){
    tmp += i;
    if(tmp >= n){
      cout << i << '\n';
      return 0;
    }
  }
}
