covert slice[max_nodes] to int