Chain rule of entropy