For a single spinful fermion orbital, S2=3(n−2n↑n↓)/4. The contraction term is 3n/4, so :S2:=S2−3n/4=−3n↑n↓/2. Empty and doubly occupied states are spinless while singly occupied states have spin one half, which also proves the identity directly.