import java.util.*; import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double s = Long.parseLong(br.readLine()); System.out.println((long)(Math.sqrt(s / 3))); } }