def discount4(price, VAT, units):
    total = price * (1+VAT/100) * units
    if total > 100:
        total = total -5
        if units > 5:
            total = total -3
    return total
    
