I'll state this plainly: Whether or not you want to own Lockheed Martin (NYSE: LMT) depends entirely on the fate of its trillion-dollar warplane, the F-35 Lightning II. It's really as simple as that -- a trillion dollars (or more) in future program costs makes Lockheed a "buy." Any number significantly smaller than that means the stock is probably a "sell."

Now for the details.

When Lockheed delivered its first batch of F-35s to the Air Force in 2007, the planes cost an average of $220 million apiece -- far above initial estimates of a $62 million price tag. Of course, that first batch was priced to include extraordinary start-up costs, including production equipment and flight test instrumentation.

Still, when "headline" prices more than triple, you might wonder whether congressional penny-pinchers would consider cutting their losses. Consider it they did. But today, Congress approved funding for both the plane's primary engine (built by United Technologies (NYSE: UTX) and a second, alternate engine built by General Electric (NYSE: GE) -- so it seems Congress is willing to let this program play out a little longer. As well it might, because ...

By the time Congress authorized its latest F-35 purchase this year, the average price on those jets had already fallen to $111.6 million, about a 50% reduction in cost from the first F-35 tranche. Clearly, there are economies of scale at work here, and Lockheed's doing everything in its power to ramp those economies, and keep the program on track. In the struggle to keep federal wallets open, it's offering Congress a carrot -- and waving a stick over its head should Congress fail to bite.

Lockheed's $60 million carrot …
You see, according to Lockheed, that first 50% cost-reduction was only the beginning for F-35. If Congress comes through with its promised purchase of an eventual 2,400 fighter jets, Lockheed says it will ultimately drive the price of each individual plane down below the original estimate -- such that on average, each F-35 purchased winds up costing $60 million or thereabouts.

Think of it as the military-industrial complex's version of a "buy one, get one free" (BOGO) sale at the Gap. If Congress keeps to its commitments, and buys the full run of 2,400 F-35s, and if the other countries partnering on the F-35's development purchase their allotted 700-odd planes (and perhaps "if" non-partner U.S. allies ante up to purchase even more F-35s), then Lockheed promises to build the things far more cheaply than it's been able to do so far -- nearly half the cost of the last batch of F-35s.

... and its much more expensive stick
On the other hand, if Congress tries to get chintzy on Lockheed -- pinch pennies, cut defense budgets, switch out F-35 funding with more purchases of Textron (NYSE: TXT) Shadow UAVs and Boeing (NYSE: BA) F-18 fighters -- beware. Lockheed warns that in order to hit its goal of $60 million-per-plane, it is absolutely "critical to maintain the expected buy rates for the plane to ensure that it remained affordable."

Translation: "We'll give you your BOGO deal -- but in order to 'get one free,' first you've got to buy one." (Or considering the scale of this program, it might be more accurate to say Congress must buy "1,200" if it wants to get its next 1,200 planes for free.)

What does this mean for investors?
Investment theses really don't get much simpler than this, Fool. If Congress maintains its buy-rate on the F-35, Lockheed looks like a terrific bargain at less than 10 times earnings -- with long-term earnings growth projected at better than 8% and a dividend payout north of 4%.

That said, any movement in Congress to curtail F-35 purchases -- for that matter, any reticence to buy among foreign purchasers (Britain has already begun cutting back its F-35 order book, although Israel seems happy to take its place in line) will drive the F-35's cost incrementally higher. This will have a snowball effect, raising the "sticker price" on the plane, reducing orders further, and diverting Pentagon funding toward cheaper alternatives to manned fighter jets. In this scenario, you'll want to focus on manufacturers of unmanned aerial vehicles -- Honeywell (NYSE: HON) for example, which builds the engines for General Atomics' Predator drone, or Northrop Grumman (NYSE: NOC), maker of the Fire Scout and Global Hawk.

Foolish final thought
We all know the effect a "BOGO" advertisement has on shoppers -- it drives 'em crazy, makes 'em buy more stuff than they really need (and sometimes more than they can afford.) My hunch tells me that this is the way things will play out for Lockheed. Congress will fear the stick, and snap up the carrot that Lockheed's waving under their nose. But do make sure you're prepared for the alternate scenario, in which budget cutbacks trump Congress's desire to score a bargain.

In scouting as in investing, be prepared.

Fool contributor Rich Smith does not own shares of, nor is he short, any company named above. Check out his latest stock recommendations on Motley Fool CAPS. The Motley Fool has a disclosure policy.

Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors.