from typing import List


def gte_x_search(lst: List[int], x: int) -> int:
    """First number in lst which is >= x"""
    left = 0
    right = len(lst) - 1
    if right == -1:
        return -1
    if right == 0:
        return lst[0] if lst[0] >= x else -1
    lst.sort()  # can be removed is lst is guarenteed to be sorted
    cur_n = 0
    while left <= right:
        mid = left + (right - left) // 2
        if lst[mid] >= x:
            cur_n = lst[mid]
            right = mid - 1
        else:
            left = mid + 1
    return cur_n