This problem does not need algebra.
Is N odd or even? How long do the walkers take to reach B? How large can N be?