John needs to cross a river with a chicken, a fox, and a corn. His boat allows himself and only one other item. He cannot leave the fox alone with the chicken and neither can he leave the chicken with the corn since the former eats the latter. How many times does he touch the shores?