P.M.Akhmetiev On a higher analog of the linking number of two curves In the paper two invariants of strangeness type are constructed for Prem-ornaments, i.e., for curves that are the projections on the plane of knots or two-component links lying in 3-space. These invariants are used to generalize M.~Friedman's theorem: it is proved that there exists a lower bound for the energy of a magnetic field frozen into a conducting liquid medium.