Doubt in Piyush and Magical Park

Can you tell what the 13 is in the output of the example.
If it is the remaining strength, can you give me the breakup of strength loss/gain while traversal of the elements of the matrix, with regard to the given example. I am not very clear.

@Bumblebee hey Himalaya go through this link you will get an idea about the how’s sample input working
piyush and magical.