On the problem of high temperature superconductivity