Sum of four numbers with regrouping