A certain school offers elective courses, including 3 humanities and social sciences and 4 literature and arts. Li Ming has to choose 3 courses. If it is required to choose at least one of these two types of courses, how many different ways are there?
某校开设选修课，其中人文社科类3门，文艺类4门．李明须从中选修3门，若要求这两类课程都至少选一门，则有多少种不同的选法．
<gadget id="calculator">18 + 12</gadget>
<output>30</output>

<result>30</result>