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.
['945', '3283', '9399', '2233', '7967', '3173', 'Y', '3971', 'a', 'w', 'S', '297', 'c', 'S', '9239', '9365', 'Y', '917', 'O']