You can follow the following rules to calculate selectors as points.
A tag selector is worth 1 point.
A class selector is worth 10 points.
An ID selector is worth 100 points.
An inline style is worth 1,000 points.
#nav li.current
= 100 + 1+10 = 111
div #nav li
= 1 + 100 + 1 = 102
a.test
= 1+10 = 11
.test .test
= 10+10 = 20