#include using namespace std; int main() { double N; cin >> N; cout << max(1LL, (long long) (sqrt(N / 3.0) * 6)) << endl; }