Problem

Source: Kyiv mathematical festival 2019

Tags: Kyiv mathematical festival, combinatorics



99 dwarfs stand in a circle, some of them wear hats. There are no adjacent dwarfs in hats and no dwarfs in hats with exactly 48 dwarfs standing between them. What is the maximal possible number of dwarfs in hats?