See first keep in mind that the element no is the number of electrons.
first minus 2 forr the first shell then minus 8 and go on if it is less than 8 in the last step then its non metal.
if its more than 8 and u cant subract eight from that then those are valencies for metals
valencies may be of 1,2,3,4,3,2,1
this is the easiest meathod other meathod are also there
plz mark as best