#include using namespace std; int main() { long N; cin >> N; cout << floor(sqrt(N + 2 / 3)) << "\n"; }