In the San Bernardino case, it turned out that the FBI didn’t actually need Apple’s help to access the data in shooter Syed Rizwan Farook’s iPhone 5c. But if Apple had helped, it certainly would have been cheaper.

Speaking at a security conference in London, FBI Director James Comey was asked how much the bureau paid the third-party gray-hat hackers for the tool that broke into the iPhone. “A lot, more than I will make in the remainder of this job, which is seven years and four months, for sure. But it was in my view worth it.”

If Comey wasn’t exaggerating, back-of-the-napkin math puts the total price above $1 million: He makes about $180,000 per year, and if you multiply that by 7.3, you get $1,314,000.

Apple would have been allowed to bill the government for its own effort and expenses had it cooperated with the All Writs Act warrant. (And if San Bernardino County, the iPhone’s owner and Farook’s employer, had enrolled the phone in the multi-device management system it already paid for, the government could have gotten into the phone for free.)

Instead, Apple refused the FBI’s request to write a special version of iOS, unaffectionately nicknamed GovtOS, that it could install on Farook’s iPhone 5c running iOS 9. The FBI wanted GovtOS to bypass the feature that would erase the iPhone after 10 failed attempts at the passcode, plus remove the time limit between attempts and allow the passcodes to be entered electronically. Apple objected to the order to write an entirely new tool to weaken its own security, claiming that the request is an overreach of the All Writs Act and also violates the company’s free speech by compelling it to write code it found offensive.

Elsewhere, lawmakers are holding hearings and writing new legislation to define what help tech companies should give law enforcement without compromising the security of millions of innocent citizens who happen to use smartphones.