He signed himself out of a Chester County drug-and-alcohol rehab center, officials said, took a cab to a Malvern bank, and made off with more than $5,000 in cash by scrawling a demand note on his discharge papers.

Then, after the robbery Monday, officials said, Jamal Goodwin, 25, of the 2600 block of South Carroll Street in Philadelphia, made a few blunders. He left a gym bag with $2,700 in cash inside the cab, where he also had left a wallet with his driver's license and an identification card, police said. Also in the car were two sweatshirts a bank teller said the robber was wearing.

Goodwin also left documentation from the Malvern Institute that was in his name, with roughly a quarter of one page torn away. He was arrested Tuesday.

The note Goodwin handed to a teller about 12:30 p.m. Monday and then left at Malvern Federal Savings Bank on West King Street was the same size and shape as the missing piece from his discharge paper, police said. It demanded money and said he had a firearm. Goodwin left with $5,110, police said.

The teller saw Goodwin leave in a Main Line Taxi Co. cab. The taxi driver told police he picked up Goodwin, who told him his name was Jamal, near the Malvern train station. He drove Goodwin to the bank, waited for him to come out, then drove him to Philadelphia.

The taxi company then told the driver to return to the bank. The gym bag, which had a tag with Goodwin's name written on it, was still inside, police said. The driver later identified Goodwin's photograph for police.

When police arrested Goodwin on Tuesday, they caught him with heroin, cocaine, and about $1,000 of the bank's money left, according to the Chester County District Attorney's Office.

Goodwin was charged with robbery, theft, and related charges.

610-313-8207@MichaelleBond