100 prisoners stand in line, one in front of the other, each wearing either a red hat or a blue hat. Every prisoner can see the hats of the people in front but not their own hat, or the hats worn by anyone behind. A prison guard starts at the back of the line and asks each prisoner the color of their hat. If they answer correctly, they will be pardoned, if they get it wrong, they’ll be executed.

How many prisoners can be saved at most if they are allowed to discuss a strategy before the jailer starts asking the colors of their hats?

The answer is an integer. Just put the number without any decimal places .