Hoping to start a new life, recidivist Sasha Medny decides to commit one last robbery. But things do not go according to plan. Hiding from pursuit on the train to Vladivostok, he appropriates the name and uniform of his compartment mate - Major Gavrilov. So the recent swindler becomes a guardian of order - the chief of police of provincial Ust-Shakhtinsk. Imposing his own orders in the city, Medny turns the usual way of life in the Russian countryside upside down.