def aplica_percentatge(quantitat, percentatge):
    return quantitat * percentatge/100

def quinquenis (any1, any2):
    return (any2-any1) // 5

def sous(sfix, vendes, percentatge, bonus, any_inc, any_act):
    svar1 = aplica_percentatge (vendes, percentatge)
    nombre_quinq = quinquenis (any_inc, any_act)
    svar2 = nombre_quinq * bonus
    return sfix + svar1 + svar2
