第一题
#include <iostream>
#include <cmath>

typedef long long ll;

int main()
{
    ll n;
    while ( std::cin >> n ) {
         std::cout << ll(sqrt(2.0 * n - 1.25) + 0.5) << std::endl;
   }

   return 0;
}