The action takes place in the Northern capital. Investigator Shiryayev once meets an unusual mathematics professor named Shtoppel, who uses a very original method of solving crimes. He is convinced that any criminal case can be solved using theorems and calculations. Shtoppel manages to completely change Shiryayev's views on how investigations should be conducted. They start working together as a team. Soon it turns out that Shtoppel also uses his analytical abilities in his personal life.