def rotated_array_search(input_list, number):
    """
    Find the index by searching in a rotated sorted array

    Args:
       input_list(array), number(int): Input array to search and the target
    Returns:
       int: Index or -1
    """
    low, high = 0, len(input_list) - 1

    while low <= high:
        mid = (low + high) // 2
        if number == input_list[mid]:
            return mid
        if input_list[low] <= input_list[mid]:
            if input_list[low] <= number <= input_list[mid]:
                high = mid - 1
            else:
                low = mid + 1
        else:
            if input_list[mid] <= number <= input_list[high]:
                low = mid + 1
            else:
                high = mid - 1
    return -1