If the compensation finally awarded to any defendant exceeds the amount which has been paid to him on distribution of the deposit, the court shall enter judgment against the petitioners and in favor of the defendant for the deficiency. If the compensation finally awarded to any defendant is less than the amount which has been paid to him on distribution of the deposit the court shall enter judgment against the defendant and in favor of the petitioner for the overpayment.
SDCL 31-19-34