Consider any matrix which is invertible say 2*2 in which sum of rows is 1, what we get is sum of all elements of A^{-1} as 2.
similarly u can check it for a 3*3 matrix it comes out to be 3.
and for 4*4 it comes out to be 4
and so on for 5*5 matrix.
and we can conclude that its equal to n for n*n matrix.