Huanhuan rides on horseback to drive horses across the river. There are four horses A, B, C, and D. It takes 2 minutes for horse A to cross the river, 3 minutes for horse B to cross the river, 6 minutes for horse C to cross the river, and 6 minutes for horse Ding to cross the river. It takes 7 minutes to cross the river, and only two horses can be driven across the river at a time. How long will it take at least to drive all four horses to the opposite bank?
欢欢骑在马背上赶马过河，共有甲、乙、丙、丁四匹马，甲马过河需要2分钟，乙马过河需要3分钟，丙马过河需要6分钟，丁马过河需要7分钟，每次只能赶两匹马过河．要把四匹马都赶到对岸去，最少要多少分钟？
<gadget id="calculator">3 + 2 + 7 + 3 + 3</gadget>
<output>18</output>

<result>18</result>