\renewcommand{\textfraction}{0.1}
\renewcommand{\topfraction}{0.8}
\usepackage[indentheadings]{russcorr}
\usepackage{zqtimes,russadd,amsmath,ifpdf}
\renewcommand{\baselinestretch}{0.97}
\usepackage{wrapfig}

% for searchable pdf
\ifpdf
\usepackage{mycmap}
\fi

\usepackage{graphicx}
\def\le{\leqslant}
\def\ge{\geqslant}

\usepackage[60x90/16]{formats}

\ifpdf
\setlength{\paperheight}{200mm}
\setlength{\paperwidth}{140mm}
\setlength{\pdfpageheight}{200mm}
\setlength{\pdfpagewidth}{140mm}
\advance\topmargin-10mm
\advance\oddsidemargin-5mm
\advance\evensidemargin-5mm
\fi

\newcounter{probl}
\newenvironment{problem}
  {\smallskip
   \par\refstepcounter{probl}{\framebox{\bfseries\arabic{probl}}}}%
  {}
\newenvironment{solution}
  {\par$\triangleright$}%
  {\ignorespaces$\triangleleft$\par\smallskip}

\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{0.1em \@plus\p@}%
    \setlength\@tempdima{1.8em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\leaders\hbox to .5em{\hss.\hss}\hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}\par
    \endgroup
  \fi}
