def Nombre(V, S = [1,7,9]):
    if V == 0:
        return 0
    else:
        minimum = V + 1
        for piece in S:
            if piece <= V:
                n = 1 + Nombre(V - piece)
                if n < minimum:
                    minimum = n
        return minimum

print(Nombre(14))