Students go to the library to borrow extracurricular books. There are only two kinds of books in the library, one is literature and art books, and the other is science and technology books. Among them, 30 people borrowed literature and art books, 24 people borrowed science and technology books, and 18 people borrowed both kinds of books. How many people borrowed books in total?
同学们到图书馆借课外书，图书馆只有两种书，一种是文艺书，一种是科技书．其中借了文艺书的有30人，借了科技书的有24人，两种书都借了的有18人，那么共有多少人借书？
<gadget id="calculator">24 - 18</gadget>
<output>6</output>

<gadget id="calculator">30 + 6</gadget>
<output>36</output>

<result>36</result>