Quantization of the highest levels in a molecular potential