How is the underlined gerund used in the sentence?

Try walking if you want to get some exercise.
----------
A.object of a preposition

B.direct object

C.predicate nominative

D.subject