import math if __name__ == '__main__': N = int(input()) print(int(math.sqrt(N/3) * 3))