Degree of Unsaturation
Python 3, 142 151 148 bytes



import re
l=dict(re.findall("(\D+)(\d+)",input()))
m=lambda k:int(l.get(k,0))
print(m("C")and m("C")+1+(m("N")-sum(map(m,"F I H Cl Br".split())))/2)


Returns 0 on error.

Thanks to @HyperNeutrino bringing the bytes down.

Try it online!