One of the biggest problems our country has is the growing idea that there really is such a thing as a free lunch: that we can get magic money to pay for things we don’t want to pay for out of our own pockets.

I think the free-lunch fallacy helps explain why three of our nation’s biggest problems seem so intractable: having a rational health-care system; producing a reasonable federal budget; and dealing with the “retirement crisis.”

Let me explain how I came up with this linkage.

As a born contrarian — okay, as a stubborn old guy — I tend to do the opposite of what’s popular. So instead of rushing to opine about the newest excesses enveloping Our Nation’s Capital, I decided recently to spend quantity time reading two books that interested me, taking some deep breaths and doing some thinking.

Both of the books — “An American Sickness” by Elisabeth Rosenthal (Penguin Press, 2017), and “Dead Men Ruling” by Gene Steuerle (Century Foundation Press, 2014) — offer amazingly helpful history and insight into how our health care and federal budget systems, respectively, have turned into such messes.

In addition, I got a bonus. Because I read both books at the same time, I saw the “free lunch” link between them. That, in turn, led me to get some stock and bond numbers that help explain why we as a nation haven’t set aside enough money to pay for baby boomers’ retirement.

Health care first. Rosenthal artfully tracks the way medicine has become a business dominated by giant health-care conglomerates that try to shake more money out of insurance companies and hapless uninsured people by charging absurd amounts for procedures, creating outrageous fees and imposing separate charges for almost everything.

She offers countless, enraging examples of people burned by the system, and of doctors and other medical professionals frustrated by health-care firms’ interest in gouging people rather than helping them.

The money-from-the-sky theory is the idea that the more you charge, the more you’ll get. Especially if you become a giant health conglomerate that dominates a city or region. A medical insurer, be it Medicare, Medicaid or United Healthcare, will generally pay only a negotiated rate. But having insanely high charges gives you a chance to gouge uninsured suckers or insurance companies whose policyholders are using your facilities out of network.

If you look at the “Explanation of Benefits” that arrives after you get insured medical care, you see the huge difference between the stated price of a procedure and what your insurer pays for it.

For example, Medicare recently got a $29 bill because I had blood drawn as part of my annual physical. The Medicare price: $3. That’s 89.7 percent less than what RWJBarnabas Health, the New Jersey colossus that has bought up the practices of almost all the doctors I use, would have tried to get from me if I didn’t have insurance.

Then there’s the charge for the contrast matter used in my wife’s CT scan. The stated price: $20. The Medicare price: 12 cents, 99.4 percent less than what Barnabas would have sought from a sucker.

I don’t buy Rosenthal’s idea that people can successfully empower themselves to get cheaper CT scans or blood tests. It seems ivory tower to me. I think the way to deal with the gouging problem is to require health-care companies to charge uninsured individuals the same rate they negotiate with Medicare.

Health care — more precisely, the rising cost of health care — is an important part of Steuerle’s budget book. He shows the horrifying evolution of the federal budget from something negotiated by people in power into a monstrosity created by former players (the metaphorical dead men) under which essentially all future tax revenue growth is committed to things like inflation adjustments, growth of Medicare and Medicaid, and to cover the ever-growing budget losses for things such as mortgage interest and the cost of employer-paid medical insurance.

Steuerle astutely attributes this problem to a financially toxic mix of Keynesian ideologists for whom no spending plan is too expensive because it will create jobs and pay for itself, and supply-side fanatics for whom no tax cut is too large because it will create jobs and pay for itself. In other words, folks on the left and right keep pushing for a free lunch.

Sometimes, like today’s situation, it’s the supply-siders’ turn to argue that gigantic tax cuts proposed by President Trump will pay for themselves. Down the road, in 2020 or 2024, it’s easy to foresee a Keynesian crew in power that will promote massive social spending increases to supposedly expand the economy.

[Trump’s big talk on the economy lacks substance]

The solution, obviously, is to get grown-ups into power in Washington who are capable of compromising with each other and staring down their parties’ extremists. I don’t know how to make that happen, but I hope it happens soon. I’d like to see the growth of government spending on my generation — I’m 72 — slow down, and the growth of spending on my grandkids’ generation rise more rapidly.

Now to retirement savings, which for a generation benefited from magic money coined by Wall Street. I’m talking about the now oft-forgotten fabulous bull market in both stocks and bonds that ran from August 1982 through March 2000. Which were the financially formative years for a good chunk of the baby boomer generation.

During those 17-plus years, the Standard & Poor’s 500-stock index produced a total return (stock price increases, dividends and reinvested dividends) of 19.73 percent a year, compounded, according to statistics I got from AJO, a Philadelphia money management firm. Bonds also did great, producing an average of 10.35 a year, compounded. So your money in stocks doubled about every 3½ years, and bond money about every seven years.

Optimism reigned. People foolishly projected those gains into the far future. Even though pensions were starting to get supplanted by 401(k)s, retirement seemed a sure thing. Accounts grew and grew.

[Why I can’t (and won’t) stop writing about Social Security]

Both corporate and government pension funds decided they could cut back on contributions because money was falling from the sky, courtesy of the financial markets. People saw little need to boost savings, either.

Oops. Magic markets are gone. For good. Since the boom ended 17 years ago, AJO says, stocks have returned only 4.77 percent a year, and bonds 5.15. That means stock values have been doubling every 15 years rather than every 3½, and bonds have doubled every 14 years rather than every seven.

The solution isn’t to await the return of magic market money. It’s to deal with what we’ve got. We collectively will have to either work longer, save more, lower our expectations — or some combination of the three.

The bottom line: As a contrarian, I don’t subscribe to the thesis that our country is hopelessly divided and that we need radical change of some sort. This is a great country, and we can solve these problems and many others if we as a society are willing to compromise. We used to do that, and we can do it again. We don’t need magic money. What we need is common sense.