The $700.00 payments are deposited at the beginning of every six months (with 2×19 or 38 six-month compounding periods in 19 years). It then follows that one seeks the amount of "an annuity due".
An Annuity Due amounts to the Annuity Future Value for one more than the number of Compounding Periods Minus one Payment Amount.
That is, one would calculate [700(1 + 0.04/2)(2×19+1) − 700] Divided By (0.04/2) Minus 700, which comes
to $40066.06689 or $40066.07.