Update the in-word sum algorithm of MyHBP