The cotangent complex and the derived de Rham algebra