#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define F first
#define S second
#define PB push_back
#define MP make_pair

typedef vector<int> vi;
typedef pair<int,int> pi;
#define REP(i,a,b) for (int i = a; i <= b; i++)

void solve(){





ll n;
cin>>n;
for (ll i = 0; i < n+5; i++)
{
    if((i*(i+1))/2 >=n){
        cout<<i;
        return;
    }
}





}


int main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n =1;
// cin>>n;
while(n--){
    // cout<<n;
    solve();
}
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) begin(v), end(v)
using namespace std;
using P = pair<int,int>;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using Graph = vector<vector<int>>;

ll ll_pow(ll a, ll n) {
  ll ans = 1;
  for(ll i = 0; i < n; i++) ans *= a;
  return ans;
}

vector<vector<int>> G;
bool temp[100001];
 
void dfs(int v){
  	if(temp[v]) return;
  	temp[v] = true;
  	for(auto vv:G[v]) dfs(vv);
}


int main() {
  int n,i;
  cin >> n;
  for(i=1;i<n;i++){
    if(i*(i+1)/2 >= n) break;
  }
  cout << i <<endl;
  return 0;
}
