Sort:  

1+4=5...5+2+5=12...12+3+6=21....21+8+11=40