#include<bits/stdc++.h>
#define N 100005
#define ll long long
using namespace std;
template<class T>void read(T&x) {
	T f=1;x=0;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while('0'<=c&&c<='9'){x=x*10+c-'0';c=getchar();}
	x*=f;
}
template<class T>void print(T x,char c) {
	if(x<0)putchar('-'),x=-x;int s[20],top=0;
	while(s[++top]=x%10,x/=10);
	while(top)putchar(s[top--]+'0');putchar(c);
}
int n;
int main() {
	read(n);
	for(int i=1; i<=n; ++i)if((i+1)*i/2 >= n)print(i,'\n'),exit(0);
}
#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n ;
  int sum = 0;
  for(int i=0;;i++){
    sum += i;
    if(sum >= n){
      cout << i << endl;
      break;
    }
  }
  return 0;
}
