and B set off at the same time from east and west places 20 kilometers apart and walk towards each other. A walks 6 kilometers per hour, and B walks 4 kilometers per hour. If he takes a dog and sets off at the same time as A, the dog runs towards B at a speed of 10 kilometers per hour. When it meets B, it immediately turns back to A. Running, met A, turned back and ran towards B, the dog didn't stop until A and B met. How many kilometers did the dog run in total?
甲和乙从相距20千米的东、西两地同时出发，相对而行．甲每小时走6千米，乙每小时走4千米，如果带了一只狗，和甲同时出发，狗以每小时10千米的速度向乙奔去，遇到乙后立即回头向甲奔去，遇到甲有回头向乙奔去，直到甲、乙两人相遇时狗才停下来．这只狗共奔跑了多少千米？
<gadget id="calculator">6 + 4</gadget>
<output>10</output>

<gadget id="calculator">20 / 10</gadget>
<output>2</output>

<gadget id="calculator">2 * 10</gadget>
<output>20</output>

<result>20</result>