As people die they sometimes go to hell. The devil, the nice bloke that he is, gives them a chance to escape and go to heaven.
He lines them up outside the gates of hell and gives them each a hat, black and white hats distributed randomly. No one gets to see the color of their own hat, but they can see the hats of everyone in front of them.
The devil approaches the person standing last in the line an asks for the color of his hat. If the answer is correct he escapes; if not, his stay in hell is final. The devil then proceeds to the next-to-last person in the line, and so on.
One hundred people have now died and they decide to come up with a strategy to help as many of them as possible to escape into heaven. They know that when they stand in line the only words the will be able to say are 'black' and 'white'.
What strategy should they use? How many can be saved?
Please note: When they stand in line, everyone can see only the people in front of them, but everyone can hear the people behind them's answer to the devil. Also note that the guy last in line can never be save for sure. No one but the devil knows his color.
Related puzzles: Three hats