Surface states in a slab of a three-dimensional crystal model