#include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
using namespace std;
// using namespace atcoder;
typedef long long int ll;
typedef pair<int, int> P;
#define yn         \
  { puts("Yes"); } \
  else {           \
    puts("No");    \
  }
#define MAX_N 200005

int main() {
  int n;
  cin >> n;
  ll ans = 0;
  ll sum = 0;
  while (sum < n) {
    ans++;
    sum += ans;
  }
  cout << ans << endl;
  return 0;
}

#include<bits/stdc++.h>

#define int long long
#define fer( a , b , c ) for( register int a = b ; a <= c ; a ++ )
#define der( a , b , c ) for( register int a = b ; a >= c ; a -- )

  using namespace std ;

inline int read(){
	int sum = 0 , f = 1 ;	
	char ch = getchar() ;
	while( ch < '0' || ch > '9' ){
		if( ch == '-' ){
			f = -1 ;
		}
		ch = getchar() ;
	}
	while( ch >= '0' && ch <= '9' ){
		sum = ( sum << 1 ) + ( sum << 3 ) + ( ch ^ 48 ) ;
		ch = getchar() ;
	}
	return sum * f ;
}

int s , p ;

signed main(){
    s = read() , p = read() ;
    fer( i , 1 , 10000005 ) if( p % i == 0 ) if( i + ( p / i ) == s ){ puts( "Yes" ) ; return 0 ; }
    puts( "No" ) ; 
	return 0 ;
}