OK, on the first page of google (from where I'm sitting), I see
http://en.wikipedia.org/w/index.php?title=Degree_of_unsaturationIt says
The formula for degree of unsaturation is
where C is the numbers of carbon atoms, H is the numbers of hydrogen atoms, X is the numbers of halide atoms, and N is the numbers of nitrogen atoms. Do not count group VI elements such as oxygen and sulfur atoms (but count H groups attached to oxygen atoms, such as hydroxyl groups). Halogen atoms (F, Cl, Br, I) count as H atoms for degree of unsaturation calculations.
Let's apply that to Pencillin G. This has the formula C
16H
18N
2O
4S.
Doing the calculation, you can see that there are (2x16 + 2 - 18 + 2)/2 or 9 degrees of unsaturation (or double bond equivalents) in the molecule.
Looking at the actual structural formula,
, you can see the benzyl ring (making 4) the amides (an further 2), the carboxylic acid (1) and the 5:4 fused rings (an extra 2), total 9 as predicted by the DBE formula.
Can you now have a go at your formula?