Fen completed a triathlon race whose total distance is D kilometers. First, she swam a distance of 0.5 kilometer. Then, she rode a bicycle for x hours at an average speed of 20 kilometers per hour. Finally, she ran for 0.5 hour at an average speed of v kilometers per hour. Write an equation that relates D, x, and v.