Help me in solving LBJ201C problem

My issue

My code

// Once the observations / logic is clear, click on 'Next' to continue.

Learning course: Java for problem solving - 1
Problem Link: CodeChef: Practical coding for everyone