Chef Shifu and Celebration || Doubt || Getting upexpected WA

PROBLEM STATEMENT : https://www.codechef.com/problems/CHSHIFU
CODE : https://www.codechef.com/viewsolution/29219651

Where am i going wrong ??
Any one can please help me !!