When Bernie performs as "Pryme Knumber" in a math circus at a Milwaukee college, an intelligence officer in the audience realizes the value of his innate ability and informs the CIA of this potential human resource. They test Bernie to see if his ability is authentic and decide to give him a thumb drive with an encoded message to crack. By mistake, they give him a top-secret message they have intercepted but have not been able to decipher.
Dieter Holz, a CIA agent with a violent history, is assigned to retrieve the thumb drive. Holz tries to take it by force, but when that fails, CIA Chief Wayne Hawkin asks Bernie and his uncle Joe to return it. They are suspicious, and refuse. Holz tries again by any means necessary but his incompetence finally lands him in a Milwaukee jail.
Eventually, Bernie cracks the encoded message. He also creates an algorithm that will let the CIA determine the prime factors of any large number. He and Joe turn his solution and the algorithm over to the CIA.
The intercepted message Bernie solved showed increasing evidence of a Chinese-Islamic alliance in Somalia, Sudan and India. The top CIA brass discuss the consequences of the message and what further action the CIA needs to take.
There is no doubt that they will need Bernie again in the future...