```python
def take_back(values: list, target: int) -> int:
    if not values or target <= 0:
        return -1

    total = 0
    for i in range(len(values) - 1, -1, -1):
        total += values[i]
        if total >= target:
            return len(values) - i - 1

    return -1
```