# -*- coding: utf-8 -*- import math n = int(input()) r = pow(n/3, 0.5) print(math.floor(r))