#include <bits/stdc++.h>
using namespace std;
int main(){
int n,s=0,i=0;
cin>>n;
while(s<n){
i++;
s+=i;
}
cout<<i<<endl;
}
/**************************************************************
Problem: 1248
User: wngjinming
Language: C++
Result: Accepted
Time:9 ms
Memory:2072 kb
****************************************************************/