This joke might be funnier if the answer is:
To get to the other side.
(The mathematicians will know that the chicken's quest will fail. Then they'll feel sorry for the chicken...)
But the non-mathematicians will JUST give you a weird look, rather than laughing and then giving you a weird look.
To get to the same side.