Jean Valjean is initially sentenced to five years for breaking a bakery window and stealing a loaf of bread to feed his hungry children. After four years, with the help of his fellow inmates, he tries to escape. He wanders without food or sleep for 36 hours. When he is recaptured, three years are added to his sentence.
Valjean makes his second escape attempt after six years. He disappears at morning roll call and is discovered in the evening. Because he resists arrest, five more years are added to his sentence, bringing his total up to thirteen years. At year ten, Valjean makes his third attempt to escape his harsh conditions. This time, his attempt adds three more years to his sentence. He makes his fourth and final attempt during year thirteen and is recaptured after only four hours. This adds another three years to his time, bringing the total to nineteen years.
As readers, we might wonder why Valjean keeps making attempts to escape, as he clearly has no plan for how to do so successfully, but we must assume it is because his condition is harsh, and he is embittered. Hugo's narrator focuses on the injustice of Valjean's original sentence and notes a study from London that shows that four out of five such thefts are due to hunger.