Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

With one hand, they giveth $45 billion to fund the fight against the national opioid epidemic.

With the other, they taketh away $800 billion from Medicaid, a quarter of which's funds are used to provide opioid-related care to millions of Americans.

That, critics say, is the awful arithmetic in the proposed Senate health care bill that the Republican leadership rolled out Thursday to replace the Affordable Care Act.

Senate Republican leader Mitch McConnell of Kentucky heads for the Senate floor on Thursday. Chip Somodevilla / Getty Images

"The bill would be a disaster if it passed," Joshua Sharfstein, a professor at the Johns Hopkins Bloomberg School of Public Health, told NBC News. "The $45 billion they've added is a drop in the bucket compared to the amount of money that would be lost in the Medicaid cuts. It's a tiny fraction of what Medicaid is already providing millions of people."

People who are addicted to drugs "need comprehensive health care which addresses many of the contributing causes of the addiction," Sharfstein said. "And what Medicaid brings to people is actual medical care."

The GOP proposal would essentially derail many of those programs, he said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"If people are using alcohol or drugs inappropriately because, for example, they're depressed, you need to get that depression treated, and Medicaid does that," he said.

Two adults, who police believe were on heroin, are passed out in a car with a boy in the backseat in East Liverpool, Ohio, in September 2016. East Liverpool police via Reuters

Dr. Matthew Davis, a professor at Northwestern University's Feinberg School of Medicine, agreed.

"To cut Medicaid by hundreds of billions over the next 10 years will make the comparatively small amount specifically dedicated to the opioid crisis less effective, rather than more effective," said Davis, who is also head of general pediatrics at Ann & Robert H. Lurie Chidren's Hospital of Chicago.

Davis said that if the senators were really serious about tackling the opioid scourge, they would be boosting Medicaid funding — not gutting it.

"To address the nation's opioid epidemic will require additional funding specifically to support opioid treatment programs, as well as sustaining — rather than cutting — Medicaid that already serves as a medical safety net for individuals in all 50 states with opioid addiction," Davis said.

Robert Shapiro, a professor and former chairman of the Political Science Department at Columbia University, said the $45 billion that Senate Majority Leader Mitch McConnell, R-Ky., proposed for dealing with the opioid crisis "is a serious number."

"Forty-five billion is a lot of money to deal with the issues of drug addiction," he told NBC News. The Republicans "can treat it as a sincere number," he said. "It's something they can talk about."

Sen. Shelley Moore Capito, R-W.Va., at a 'Women's Summit' organized by the Republican National Committee in Washington, D.C., in October 2015. Tom Williams / CQ-Roll Call,Inc. file

"The bigger issue is the $800 billion in Medicaid cuts, which are going to affect a lot of people, including a lot of middle-class people who won't be able to afford nursing homes," Shapiro added. "McConnell is in a tough bind here. He didn't put up a bill just to let it be killed. But without the Medicaid cuts, he won't be able to keep the conservatives."

The Affordable Care Act, also known as Obamacare, expanded Medicaid to millions of people who lacked health care coverage, providing the most vulnerable Americans with substance abuse problems to gain access to badly needed services and care.

Knowing that any plan that would hurt those people would not fly with Republican senators from hard-hit states, like Shelley Moore Capito of West Virginia and Rob Portman of Ohio, McConnell agreed to stick in the $45 billion — after initially having budgeted just $2 billion.

But opponents said McConnell was simply trying to provide political cover for Republicans who had been elected on the promise of repealing Obamacare.

Sen. Rob Portman, R-Ohio, at a Judiciary Committee hearing on heroin and prescription drug abuse in Washington in January 2016. Alex Brandon / AP file

"Senators should not be hoodwinked into thinking promises of new opioid funding will mitigate severe harm that the health care bill will bring to communities hit hard by the opioid crisis," Grant Smith of the Drug Policy Alliance said last month when the first details of the Republican-designed plan emerged.

Smith said there was "considerable overlap" between the states that expanded Medicaid under Obamacare "and states that have been hit hard by the opioid crisis." He specified Ohio and West Virginia.

Portman said after the plan was unveiled that he was still undecided. Capito was also on the fence.