Forget Bozeman, Missoula, Billings, or Great Falls. When you're looking for some of the most valuable properties in Montana, the smallest towns are now the hotbed for some seriously impressive real estate.
When you think about "rich zip codes" in Montana, the smaller foo-foo ski towns or lake towns might spring to mind first. Depending on what measure of wealth we use, you might actually be right. But in this instance, the question was specific and didn't have to deal with accumulated wealth or real estate holdings.
You have to pay to play in Montana. Play outdoors, that is. The toys, the gear, the vehicles, the activities, the permits, and everything else you might need to pursue Montana's outdoor adventures can get VERY expensive.