Area above the time axis (trapezoid from t=0 to t=313):
Area1=21×(sum of parallel sides)×height=21×[313+(3−2)]×4=2×(313+1)=332 m
Area below the time axis (triangle from t=313 to t=6):
Area2=21×base×height=21×35×2=35 m
Total distance covered: d=Area1+Area2=332+35=337 m