The story is better than that, though. He was working on one of his great novels as a serial (Crime and Punishment, I think), so he had to keep writing that during the day. But he had to produce another novel at the same time in order not to lose his future royalties to this publishing contract, which he had signed to pay off his own gambling debts. He was in despair, but a clever friend found the star pupil at the local shorthand academy and Dostoevsky dictated The Gambler to her in the evenings while she got it down in shorthand (a new technology at the time) and later transcribed it. They only had a few weeks, and finished it at the last minute, but the publisher had cunningly closed his office that day. He was no match for Anna, however, who took the manuscript to the nearest police station and got a receipt, rescuing Dostoevsky's career. Then he married her.