#include <bits/stdc++.h>
using namespace std;
int main(int arg, char** argc) {
  ios_base::sync_with_stdio(false);
  int n, s = 0, i = 1;
  cin >> n;
  for (i = 1; s <= n; i++) s += i;
  cout << i - 1 << "\n";
  return 0;
}
