With the release of the Senate investigation into the CIA’s detention and interrogation program, we now know more about the program than ever before. Besides the fact that the coercive so-called “enhanced interrogation techniques” weren’t effective, we more about know how much it cost US taxpayers to run a global network of torture sites.

While the declassified version of the report does not offer a full summation of the program’s costs—and the US intelligence community’s $53 billion black budget remains largely secret, despite Edward Snowden’s leaks—we now have evidence of at least $380 million in funding.

You have to pay for interrogators who are willing to cross the line.

The report notes that contractors trained in “enhanced interrogation techniques” were paid $1,800 a day, four times as much as interrogators who didn’t use those techniques. The same interrogators were paid to violently interrogate the prisoners, evaluate their psychological state and recommend further use of the techniques—a significant conflict of interest. Contractors made up 85% of the CIA staff working on this program, including one firm that receive an $180 million contract that was eventually terminated—but not before the firm collected $80 million.

After a detainee died from hypothermia caused by a night spent partially naked in a cold concrete cell, the supervising CIA agent received a $2,500 cash bonus for “consistently superior work.”

You have to pay for your secret prisons.

The CIA interrogated these detainees in secret facilities known as “black sites” in several countries, mainly in Afghanistan but also in Poland, Romania, Lithuania and Thailand. Building the sites was not cheap: Non-personnel costs for this program came to $300 million, largely for the construction and maintenance of the facilities. One facility cost $200,000 to set up. At least two were built and never used because host countries got cold feet. Which brings us to…

You have to pay the local government to look the other way.

Much of the report concerns requests for money from the countries hosting the “black sites.” One country that refused to accept the transfer of several detainees changed its mind after the US Ambassador intervened with a gift of at least $1 million. In another case, a local CIA station told to “think big” drew up a multi-million dollar “wishlist” to demonstrate their appreciation to a host country; headquarters sent more money than was asked for.

One agent in the program said we had “more money than we could possibly spend we thought, and it turned out to be accurate…in one case, we gave ██████ $██000,000 ███████████ …We never counted it. I’m not about to count that kind of money for a receipt.”

During one discussion about re-locating a detention cite, a CIA station chief observed that “Do you realize we can buy [Country █] for $██████?”

You have to pay for your mistakes

The program picked up costs for its failings. After Lithuania refused to allow an ill detainee at the “black site” there, known in the report as “detention site Violet,” to be admitted to a local hospital, the CIA spent several million dollars obtaining medical care for him and four others in three different countries.

At other times, the CIA held and interrogated innocent people they mistook for terrorists—26 people, 22% of those detained, did not meet CIA standards for detention. One detainee in Afghanistan was “released with $███ and told not to speak about his experience.” Another, a German citizen named Khaled al-Masri, was mistakenly detained, he was released with €14,500 ($17,000) “as well as his belongings.”

And then there are legal costs back in the US: The CIA agreed to pay the legal costs of one of its contractors, the firm with the $180 million contract that designed and managed enhance interrogations, through 2021. It has already paid $1.1 million as part of the agreement.