FactSet Interview Question

how to find next greatest no.?