i just want to ask .... what code is the best for this ....

i have 3txtBoxes and 1 commandbutton

1st txtBox the user must input 10 or less than 10 Ex: 1234567890
2nd txtBox the user must input a folding process Ex: 1+2+345+6789+0
3rd txtBox where the answer appers Ex: 7137

And another

if i input "12345"
and the process that i want is "123+45"
the answer must be "51"

And another thing
there's too many possible process that can be done that depends on how many digits that inputed Ex: 6 digits the process that i want is 1+2+3+4+5+6

so please help me