import bisect
def find_port(ports, target):
"""
Returns the first integer in ports that equals the target or is greater.
If there is no solution, returns -1.
Args:
ports (list): A sorted list of port numbers.
target (int): The target port number.
Returns:
int: The first port number greater than or equal to the target, or -1 if not found.
"""
# Find the insertion point for the target in the sorted list
index = bisect.bisect_left(ports, target)
# If the target is in the list or there's a port greater than the target, return it
if index != len(ports):
return ports[index]
# If no port is greater than or equal to the target, return -1
return -1
aW1wb3J0IGJpc2VjdAoKZGVmIGZpbmRfcG9ydChwb3J0cywgdGFyZ2V0KToKICAgICIiIgogICAgUmV0dXJucyB0aGUgZmlyc3QgaW50ZWdlciBpbiBwb3J0cyB0aGF0IGVxdWFscyB0aGUgdGFyZ2V0IG9yIGlzIGdyZWF0ZXIuCiAgICBJZiB0aGVyZSBpcyBubyBzb2x1dGlvbiwgcmV0dXJucyAtMS4KCiAgICBBcmdzOgogICAgICAgIHBvcnRzIChsaXN0KTogQSBzb3J0ZWQgbGlzdCBvZiBwb3J0IG51bWJlcnMuCiAgICAgICAgdGFyZ2V0IChpbnQpOiBUaGUgdGFyZ2V0IHBvcnQgbnVtYmVyLgoKICAgIFJldHVybnM6CiAgICAgICAgaW50OiBUaGUgZmlyc3QgcG9ydCBudW1iZXIgZ3JlYXRlciB0aGFuIG9yIGVxdWFsIHRvIHRoZSB0YXJnZXQsIG9yIC0xIGlmIG5vdCBmb3VuZC4KICAgICIiIgogICAgIyBGaW5kIHRoZSBpbnNlcnRpb24gcG9pbnQgZm9yIHRoZSB0YXJnZXQgaW4gdGhlIHNvcnRlZCBsaXN0CiAgICBpbmRleCA9IGJpc2VjdC5iaXNlY3RfbGVmdChwb3J0cywgdGFyZ2V0KQogICAgCiAgICAjIElmIHRoZSB0YXJnZXQgaXMgaW4gdGhlIGxpc3Qgb3IgdGhlcmUncyBhIHBvcnQgZ3JlYXRlciB0aGFuIHRoZSB0YXJnZXQsIHJldHVybiBpdAogICAgaWYgaW5kZXggIT0gbGVuKHBvcnRzKToKICAgICAgICByZXR1cm4gcG9ydHNbaW5kZXhdCiAgICAKICAgICMgSWYgbm8gcG9ydCBpcyBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gdGhlIHRhcmdldCwgcmV0dXJuIC0xCiAgICByZXR1cm4gLTE=