Thermodynamics of DNA branching