sample graph of above question will be
four corners will be having total degree = 4*3=12
four sides {except corner} will be having total degree = 40*5=200
now, nodes which are in between {100 nodes are there} are having total degree =100*8=800
total degree = 12+200+800= 1012
as we know, sum of degree =2e
2e=1012
e=506