Pion-nucleon scattering in the K-matrix approach