firstArray = [1, 2,-2,5,4 ,3,0]
firstArray.sort(reverse=False)
print(firstArray)

required = None
for num in range(firstArray[0],firstArray[-1]):
    if num not in firstArray:
        if num >0:
            required = num
if required == None:
    required = firstArray[-1]+1
    
print("Required:",required)

99d6481e8c9af058c6232f7b53ccffeaff9371a1
<mask token>

<mask token>
firstArray.sort(reverse=False)
print(firstArray)
<mask token>
for num in range(firstArray[0], firstArray[-1]):
    if num not in firstArray:
        if num > 0:
            required = num
if required == None:
    required = firstArray[-1] + 1
print('Required:', required)

firstArray = [1, 2, -2, 5, 4, 3, 0]
firstArray.sort(reverse=False)
print(firstArray)
required = None
for num in range(firstArray[0], firstArray[-1]):
    if num not in firstArray:
        if num > 0:
            required = num
if required == None:
    required = firstArray[-1] + 1
print('Required:', required)

firstArray = [1, 2,-2,5,4 ,3,0]
firstArray.sort(reverse=False)
print(firstArray)

required = None
for num in range(firstArray[0],firstArray[-1]):
    if num not in firstArray:
        if num >0:
            required = num
if required == None:
    required = firstArray[-1]+1
    
print("Required:",required)
