n = int(input("N ="))
a = int(input("A ="))
b = int(input("B ="))
c = int(input("C ="))

ports = (a*3) + (b*2) + c
rep = a + b + c

comp = ports - (rep - 1)

if comp > n:
    print("All {} could be connected to the net".format(n))
else:
    print("***warning*** only {} computers from {} could be connected to the net".format(comp, n))
