def helper(coins, amount):
    if (amount in memo):
        return memo[amount]
    if (amount == 0):
        return 0
    dp = float('inf')
    for coin in coins:
        if (coin > amount):
            continue
        dp = min((helper(coins, (amount - coin)) + 1), dp)
    memo[amount] = dp
    return dp
def helper(coins, amount):
    if (amount in memo):
        return memo[amount]
    if (amount == 0):
        return 0
    dp = float('inf')
    for coin in coins:
        if (coin > amount):
            continue
        dp = min((helper(coins, (amount - coin)) + 1), dp)
    memo[amount] = dp
    return dp