Surface and flexoelectric polarization in a nematic liquid crystal 5CB