If I were convinced the apocalypse were going to happen in the next couple years, I would start storing up ramen noodles, Hersheys chocolate bars, and M&Ms. Cheap to purchase, easy to store, and likely to have astronomic value post-apocalypse.
Though now that you point it out, maybe I would rather buy rice and beans so that I could be more useful to people, rather than just maximizing profit. Or better yet, stock up on both kinds of goods.