From point A to point B, Xiaoming travels 40 kilometers more by boat than the whole journey (3/8), then travels by car 20 kilometers less than the rest of the distance (1/3), and then Traveling by train is 30 kilometers longer than traveling by car (4/5). Finally, there are 5 kilometers left to walk. What is the distance in kilometers between A and B?
小明从A地到B地，先乘轮船行的比全程的(3/8)还多40千米，接着乘汽车行的比余下的路程的(1/3)还少20千米，再接着乘火车行的比乘汽车后剩下的(4/5)还多30千米．最后还剩下5千米步行．问A、B两地的路程是多少千米．
<gadget id="calculator">5 + 30</gadget>
<output>35</output>

<gadget id="calculator">4 / 5</gadget>
<output>4/5 = around 0.8</output>

<gadget id="calculator">1 - (4/5)</gadget>
<output>1/5 = around 0.2</output>

<gadget id="calculator">35 / (1/5)</gadget>
<output>175</output>

<gadget id="calculator">175 - 20</gadget>
<output>155</output>

<gadget id="calculator">1 / 3</gadget>
<output>1/3 = around 0.333333</output>

<gadget id="calculator">1 - (1/3)</gadget>
<output>2/3 = around 0.666667</output>

<gadget id="calculator">155 / (2/3)</gadget>
<output>465/2 = around 232.5</output>

<gadget id="calculator">(465/2) + 40</gadget>
<output>545/2 = around 272.5</output>

<gadget id="calculator">3 / 8</gadget>
<output>3/8 = around 0.375</output>

<gadget id="calculator">1 - (3/8)</gadget>
<output>5/8 = around 0.625</output>

<gadget id="calculator">(545/2) / (5/8)</gadget>
<output>436</output>

<result>436</result>