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