A company purchased 40 desk calendars and 16 wall calendars for $900. If the cost of each desk calendar is d dollars and each wall calendar is w dollars, which of the following equations represents the given situation?
a) 40d + 16w = 900
b) 16d + 40w = 900
c) 40d - 16w = 900
d) 16d - 40w = 900