Similarity method for the study of strong shock waves in magnetogasdynamics