It's quite self-explanatory I would think.
Run the test through two times just to make sure that it comes out with the correct answer.