print((function (n) return math.floor(math.sqrt(n/3)) end)(io.stdin:read("*n")))