def find_combination(value, stream):
    """
    >>> find_combination(127, [35, 20, 15, 25, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127, 219, 299, 277, 309, 576])
    62
    """

    x = 0
    y = 2

    while True:
        total = sum(stream[x:y])

        if total < value:
            y += 1
        elif total > value:
            x += 1
        else:
            return min(stream[x:y]) + max(stream[x:y])