A party may amend his pleading once as a matter of course at any time before a responsive pleading is served or, if the pleading is one to which no responsive pleading is permitted and the action has neither been placed upon the trial calendar, nor an order made setting a date for trial, he may so amend it at any time within twenty days after it is served. Otherwise a party may amend his pleading only by leave of court or by written consent of the adverse party; and leave shall be freely given when justice so requires. A party shall plead in response to an amended pleading within the time remaining for response to the original pleading or within ten days after service of the amended pleading, whichever period may be the longer, unless the court otherwise orders.
SDCL 15-6-15(a)