Can you please explain me the sample test case given

What I’ve understood from the ques is that Piyush will choose from 4 or 1, and then Nimit will take the larger one from start or end of remaining coins.
By this approach my ans is 2.