import sys def solve(): n = int(input()) ans = int((n // 3)**0.5) if ans == 0: ans = 1 print(ans) if __name__ == '__main__': solve()