The starting fee for a taxi is 12 yuan for 3 kilometers, and the fee for each subsequent kilometer is 2 yuan. It is 18 kilometers from the school to the library. How much is the total cost of taking a taxi?
出租车起步费12元行驶3千米，以后每千米费用为2元，从学校到图书馆有18千米，乘出租车一共需要多少元？
<gadget id="calculator">18 - 3</gadget>
<output>15</output>

<gadget id="calculator">15 * 2</gadget>
<output>30</output>

<gadget id="calculator">30 + 12</gadget>
<output>42</output>

<result>42</result>