The cooperative Lamb shift in an atomic nanolayer