HAT's Off

Three mathematicians are applying for a job. There are 5 hats, 
3 white, 2 black. They're lined up, and a hat is placed on each. 
The first person in line cannot see any hat; the second in line 
sees only the hat of the person in front of him; the third person 
sees only the hats of the two people in front of her. The first 
person to correctly figure out what color hat they have gets the 
job; you guess wrong and you are killed. Assume these are INTELLIGENT 
mathematicians, and that they will do the logically correct thing 
at each stage -- if something can be deduced, they will. After a 
long pause, the first person, who cannot see any hats, says he knows 
the color of his hat. What is the color, and how does he know?