how to find valency of an element