nums in non-decreasing order.left to 0 and right to the length of nums.left is less than or equal to right:
a. Calculate mid as the average of left and right.
b. Use binary search to find the first index where the value is greater than or equal to mid.
c. Calculate the number of elements greater than or equal to mid.
d. If the count is equal to mid, return mid as the answer.
e. If the count is less than mid, adjust right to mid - 1.
f. If the count is greater than mid, adjust left to mid + 1.x is found, return -1.