import math n = int(input()) print(abs(math.floor(math.sqrt(n / 3))))