CCTV cameras spotted the 21-year-old with cocaine on a night out in Barnstaple.
A Bideford man was caught on CCTV with cocaine in his sock on a night out.
Jesse Curtis, 21, of Adrian Close, said he had only bought cocaine twice in his life - and been caught both times.
Curtis was seen on cameras on March 19 stuffing a packet into his sock, and police were alerted.
Officers found him and searched him where they found 0.58g of cocaine - worth £20 - in his possession.
He told North Devon Magistrates Court on Friday: “It was a stupid, drunken mistake.”
He was fined £281 for posession of the drugs by magistrates.