The residual entropy is one of the most crucial properties for the existence of a large number of ice polymorphs. The residual entropy has been estimated by Pauling assuming that there is no large difference between the hydrogen bond energies in ice. This simple model accurately predicts the entropy change of the phase transition between a hydrogen-disordered ice phase and its hydrogen-ordered counterpart. This fact is, however, incompatible with another fact that the difference in the pair interaction energies involved in hydrogen bonds in an ice phase can be larger than the thermal energy of a few kJ/mol. Here we propose a mechanism that reconciles them by considering the equality of the binding energy in each molecule rather than the pair interaction energy of the proximate pair. The topological feature of ice, called the ice rules, allows us to replace the interactions of a water molecule with the other individual molecules by that with the collections of the dipoles represented by directed cycles consisting of O-H vectors. This resummation reveals that molecular environments in ice are extremely homogeneous thereby providing a solid basis for Pauling's model.