In this task, you are given an input list A. You need to find all the elements of the list that are numbers and calculate their sum.
['6539', '7797', '9255', 'r', 'w', '2095', '9269', '7851', '2981', 'w', '9787', '5817', 'g']