N pirates stand in a line, facing forward, so that pirate $1$ sees pirates $2,3,\ldots,N$, pirate $2$ sees pirates $3,4,\ldots,N$, pirate $3$ sees pirates $4,5,\ldots,N$, etc. Each pirate wears a hat, each hat is either red or blue, but no pirate knows the color of his own hat. More specifically, each pirate knows only the colors of the hats on the pirates that he sees. An executioner asks each pirate, in order (pirate $1$, then $2$, etc), what the color of the pirate's hat is. Everyone can hear the pirate's answer. If the pirate answers correctly, the executioner spares the pirate. Otherwise, executioner executes the pirate. The pirates have anticipated that they might face this situation, and have agreed on a protocol for answering in advance. Their goal is to have as few pirates killed as possible. The puzzle is to figure out what is the best they can do. That is, describe a protocol that minimizes the worst-case number of pirates killed. (Here worst-case is over all possible ways of coloring the hats red or blue.) For example, one protocol would be that pirate $1$, when asked the color of her hat, answers with the color of pirate $2$'s hat. Pirate $2$ hears what pirate $1$ says, thus learning her own hat color, and then when she is asked, she simply gives the correct answer. Continuing in this way, half of the pirates lives are saved (in the worst case). Assume that the pirates cannot tell if a pirate is executed or not.