There is a flagpole in the middle of the playground, and Xiao Ming starts to stand 10 meters away from the flagpole in the east of the flagpole. Then walk due north for 10 meters, then turn left and walk due west for 20 meters, then turn left and walk due south for 30 meters, then turn left and walk due east for 40 meters, then turn left and walk due north 20 meters. At this time, how many meters is Xiao Ming away from the flagpole?
操场正中央有一旗竿，小明开始站在旗竿正东离旗竿10米远的地方．然后向正北走了10米，再左转弯向正西走了20米，再左转弯向正南走了30米，再左转弯向正东走了40米，再左转弯向正北走了20米．这时小明离旗竿多少米．
<gadget id="calculator">40 - 20</gadget>
<output>20</output>

<gadget id="calculator">20 + 10</gadget>
<output>30</output>

<result>30</result>