Neznayka, Doctor Pilyulkin, Knopochka, Vintik, and Znayka participated in a math contest. Exactly four out of them solved each problem. Znayka solved more problems than each of the others - 10 problems, while Neznayka solved fewer problems than each of the others - 6 problems. How many problems in total were there in the math contest?