AS THE economic tide recedes, it exposes all manner of ugliness, from the gargantuan fraud of Bernard Madoff to books-fiddling at Satyam. But what is bad news for most people means more business for Larry Levine, the founder of Wall Street Prison Consultants, which teaches white-collar criminals how to survive prison.

Mr Levine, a former private investigator, knows whereof he speaks: he spent ten years shuttling between 11 federal prisons on charges related to narcotics, obstruction of justice and securities fraud. He remains under supervised parole, which means he must conduct all of his business by telephone (passing time in the company of other convicted felons is a parole violation, and would result in his returning to jail). He calls himself a jailhouse litigator (“jailhouse lawyer”, he explains, “sounds cheap”). Long stretches in his prisons' law libraries left him more familiar with the Byzantine rules of America's federal prison system than most wardens.

He first made something of that knowledge towards the end of his sentence, in 2005, when he sued the Federal Bureau of Prisons on behalf of about 100 terrified white-collar prisoners who were transferred en masse from a minimum-security prison (the type derisively called “Club Fed”) to a low-security prison where they shared space with gang members and other violent criminals.

Hundreds of terrified fraudsters later, Mr Levine's business is thriving. Starting at $999 per consultation, he advises criminals on all aspects of prison life. How can you advance your release date? Many prisoners suddenly discover, post-conviction, that they had a drinking problem (participating in rehab shaves time off sentences). Where should you look for friends? Do not cross racial lines—many federal prisons are so segregated that they have “black” telephones and “white” telephones—and do not make friends with a “rat”, or known informant. What about prison etiquette? Do not sit on another inmate's bunk without being invited to do so, do not change the television channel when someone else is watching and do not jump in line. Show respect to everyone (Mr Levine cautions that reaching across someone's tray at the dining hall is a good way to get yourself “stuck”, or stabbed).

Still, even Mr Levine can't help everyone. He is pessimistic about Mr Madoff's chances of leaving prison alive. Thieves rank low in prison hierarchy, and he reckons that other inmates whose families have been hurt by the downturn will blame Mr Madoff. “You rob a bank, that's cool,” he explains. “Someone defrauded an insurance company, and he's cool. The worst thing you can be in prison is a thief who steals from people, and Bernie stole from people.”