Elements of clssical and statistical thermodynamics