\[\boxed{\mathbf{1012.}}\]
\[tg\ a + ctg\ a = 5\]
\[tg\ a + ctg\ a = \frac{\sin a}{\cos a} + \frac{\cos a}{\sin a} =\]
\[= \frac{\sin^{2}a + \cos^{2}a}{\cos a \cdot \sin a} = \frac{1}{\sin a \cdot \cos a}\]
\[\frac{1}{\sin a \cdot \cos a} = 5.\]
\[(tg\ a + ctg\ a)^{2} = tg^{2}a +\]
\[+ 2tg\ a \cdot ctg\ a + ctg^{2}a =\]
\[= tg^{2}a + ctg^{2}a + 2\]
\[tg^{2}a + ctg^{2}a + 2 = 5^{2}\]
\[tg^{2}a + ctg^{2}a = 25 - 2\]
\[tg^{2}a + ctg^{2}a = 23.\]
\[tg^{2}a + \frac{1}{\sin a} \cdot \frac{1}{\cos a} + ctg^{2}a =\]
\[= 23 + 5 = 28.\]