The poles of the S-matrix of a rectangular potential well of barrier