It was completed during the reign of Ferdinand VI by the mid-18th century ; Charles III had two wings added to it .
It was completed during the reign of Ferdinand VI in the mid-18th century . Charles III added two wings to it .