Refactored HP data type and generalized to N integers