Xiaohong's home is 500 meters away from the school. One day when she went to school, after walking 40 meters, she remembered that she had forgotten to wear the red scarf, so she immediately went home and put on the red scarf before going back to school. How many meters did she walk to school that day?
小虹家离学校500米．一天上学，她走了40米后，想起忘了戴红领巾，马上回家戴了红领巾再回到学校．这天上学她一共走了多少米？
<gadget id="calculator">40 * 2</gadget>
<output>80</output>

<gadget id="calculator">500 + 80</gadget>
<output>580</output>

<result>580</result>