public static void main(String[] args) throws Throwable {
		
		mon = new int[22];
		for (int i = 0; i < mon.length;) {
			i++;
			mon[i-1]=i*i*i;
		}
//		System.out.println(Arrays.toString(mon));
		mat = new long[10001][22];
		for(int i=0;i<mat.length;++i){
			for(int j=0;j<mat[i].length;++j){
				if(i==0)mat[i][j]=1;
//				System.out.println(mon[j] + " " + i);
				if(mon[j]>i)mat[i][j]=10;
			}
		}
		
		for (int i = 0; i < mat.length; i++) {
			f(i,0);
		}
		
		BufferedReader in = new BufferedReader( new InputStreamReader( System.in ) );
		StringBuilder sb = new StringBuilder();
		for (String linea; (linea=in.readLine())!=null; ) {
			
			int n = Integer.parseInt(linea.trim());
			
			long sol = f( n, 0 );
			sb.append(sol+"\n");
		}
		System.out.print(new String(sb));
	}