Insert M bags among N ordered bags, then pick a non-adjacent subset to maximize chips.
Read N, list A, M, list B.
Print the maximum number of chips.