Application of the complex rotation method to the study of resonance states of atoms at a corrugated surface