Add mth to last element