LAWRENCE – A Lynn father of three who admitted robbing a Lynn pharmacy twice within a year to feed his cocaine addiction will spend two years in state prison before being placed on probation for another three years.Gary Smith, 44, who last lived at 74 Collins St., #2, was about to go on trial Wednesday in Lawrence Superior Court, but instead opted to negotiate a plea bargain and confess to two counts of unarmed robbery before Judge Leila R. Kern.On Oct. 31, 2005, Smith walked into Brooks Pharmacy at 156 Lewis St., handed a note to the clerk indicating he had a gun, while demanding money and fled the drug store with under $200.Then nine months later at about 12 p.m., on July 21, 2006, he walked into the same pharmacy, up to the same female drug store clerk, who believed he had a gun, and demanded cash again. He fled the store this time with an undetermined amount of cash.The drug store clerk picked Smith out of a photo array shown to her by police.Following an investigation, Smith was arrested and admitted to both robberies, police said.Defense lawyer Lawrence J. McGuire told Kern that his client was “heavily addicted to crack cocaine” at the time of these robberies as he asked the judge to impose his recommended punishment of two years in prison with three years probation.Assistant District Attorney James P. Gubitose who was seeking a five to seven year sentence with probation, pointed to his long criminal record, his history of violence, and the ordeal he put the drug store clerk through twice.Smith was initially indicted by a grand jury on armed robbery charges, but because no actual weapon was shown, the charge was reduced to unarmed robbery as part of negotiations.While on probation, Smith will receive drug treatment and counseling as deemed appropriate.The judge credited Smith the 412 days he has spent in jail awaiting trial on the case.