Thermodynamic properties of ultrasmall superconducting grains