In 1912, a Serbian mathematician named Milutin Milanković set out to calculate the temperature of every planet in the solar system using nothing but pencil, paper, and a theory that nearly everyone ignored for fifty years. Then a geologist cracked open an ice core in the 1970s and found his numbers buried in the ancient sediment — almost exactly right. This is the story of how one man's obsessive arithmetic predicted Earth's ice ages from a prison cell during World War One, and why the climate cycles he described may determine the fate of human civilization.