def possible_change(coins, total):
    if total == 0:
        return 1
    if total < 0 or not coins:
        return 0

    first = coins[0]
    rest = coins[1:]

    return possible_change(coins, total - first) + possible_change(rest, total)