Michael earned $27 mowing lawns. He earned $12 less then that washing windows.He earned 3 times as much money walking dogs as he earned washing windows. How much money did Michael earn walking dogs?

A. $5

B. $15

C. $27

D. $45