using System;class P{static void Main(){Console.WriteLine((int)Math.Sqrt(long.Parse(Console.ReadLine())/3));}}