```python
def find_missing(ar, N):
    """
    Finds the missing number in a sorted array of unique integers from 1 to N.

    Args:
        ar: A sorted list of integers of size N-1, containing numbers from 1 to N
            with one number missing.
        N: The upper bound of the range of numbers (i.e., the range is 1 to N).

    Returns:
        The missing integer.
    """
    # The expected value at index `i` should be `i + 1` because the array
    # is 0-indexed but the number sequence starts from 1.
    # For example, ar[0] should be 1, ar[1] should be 2, and so on.

    # We iterate through the array to find the first index where the
    # actual number does not match the expected number.
    for index, number in enumerate(ar):
        expected_number = index + 1
        if number != expected_number:
            return expected_number

    # If the loop completes without finding any mismatch, it means the
    # array contains all numbers from 1 to N-1. Therefore, the missing
    # number must be N.
    return N

```