/**
 *   @FileName	a.cpp
 *   @Author	kanpurin
 *   @Created	2021.04.01 02:47:06
**/

#include "bits/stdc++.h" 
using namespace std; 
typedef long long ll;

int main() {
    int n;cin >> n;
    int k = 0;
    while(2 * n > k*(k+1)) {k++;}
    cout << k << endl;
    return 0;
}