The layered S-N model of HTSC and its physical properties