Add function to combine dynamic numbers