Operator Pencils Arising in Elasticity and Hydrodynamics: The Instability Index Formula