Why not `4*(p%2)` instead of `shift[p % 2]`?