Man gets 18 years for robbing pharmacy twice