Thermodynamics of formation of hybrid perovskite-type methylammonium lead halides.