The distance from point A to point B is 40 kilometers. Wang Jun originally planned to ride a bicycle, but later changed to take a car for the first half and walk for the second half. The speed of the car is twice the speed of the bicycle, the speed of walking is half that of the bicycle, and the speed of the bicycle is 10 kilometers per hour. What is the average speed on this road?
A地到B地的距离有40千米，王俊原计划骑自行车去，后改为前半段乘汽车，后半段步行．汽车速度是自行车速度的2倍，步行速度是自行车的一半，自行车速度是每小时10千米．行这段路的平均速度是多少？
<gadget id="calculator">10 * 2</gadget>
<output>20</output>

<gadget id="calculator">40 / 2 / 20</gadget>
<output>1</output>

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

<gadget id="calculator">40 / 2 / 5</gadget>
<output>4</output>

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

<gadget id="calculator">40 / 5</gadget>
<output>8</output>

<result>8</result>