#include <iostream>
#include <cmath>
using namespace std;
int main() {
int n;
cin >> n;
cout << round(sqrt(2 * n));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKICAgIGludCBuOwogICAgY2luID4+IG47CiAgICBjb3V0IDw8IHJvdW5kKHNxcnQoMiAqIG4pKTsKICAgIHJldHVybiAwOwp9