Criticality of the discrete N-vector ferromagnet in a cubic lattice with a free surface