There are 27 masters in a factory with a total of 40 apprentices. Each master can lead one apprentice, two apprentices or three apprentices. If the number of masters with one apprentice is twice the number of other masters, then two How many apprentice masters are there?
某工厂的27位师傅共带40名徒弟，每位师傅可以带一名徒弟、两名徒弟或三名徒弟，如果带一名徒弟的师傅的人数是其他师傅人数的两倍，那么带两名徒弟的师傅有多少位？
<gadget id="calculator">2 + 1</gadget>
<output>3</output>

<gadget id="calculator">27 / 3</gadget>
<output>9</output>

<gadget id="calculator">9 * 2</gadget>
<output>18</output>

<gadget id="calculator">27 - 40</gadget>
<output>-13</output>

<gadget id="calculator">18 + (-13)</gadget>
<output>5</output>

<gadget id="calculator">3 - 2</gadget>
<output>1</output>

<gadget id="calculator">5 / 1</gadget>
<output>5</output>

<result>5</result>