Extract max hats to a constant