Valence is: