Hat Check

One hundred people stand in a line, all facing in the same direction. Each is wearing a red or a blue hat, assigned at random. Each person can see all the hats before him in the line, but not his own or those of the people behind him. Starting at the back of the line, each person in turn must guess the color of his own hat. Each person can hear all the prior guesses. If the group are allowed to discuss strategy beforehand, how many can be sure of guessing correctly?

Click for Answer