12
40
30
7
9
max(12 + 40, 30 + 7 + 9) =