

```python
def fit_budget(prices: list, budget: int) -> int:
    if budget < 0:
        raise ValueError("Amount must not be negative")
    if not prices:
        return 0

    prices.sort()
    total = 0
    for price in prices:
        if budget >= price:
            budget -= price
            case += 1
        else:
            break

    return case

```