How getting lost helped Dostoevsky overcome his gambling addiction

Dostoevsky had to write The Gambler in two months. He had no choice.
He had accepted 3000 roubles from a publisher named Stellovsky to keep his creditors at bay.
If he failed to deliver a work of not less than 10 printer’s sheets (160 pages) by 1 November 1866, Stellovsky would receive the rights and income for all of Dostoevsky’s previous and future work for nine years.
Dostoevsky broke off writing Crime and Punishment to take on the seemingly insurmountable task of completing a novel in such a short period of time.