FIBNK WA issue getting wrong answer

Can someone please helpme in figuring out , whats wrong with my code . It is giving wrong answer on codechef.
Q - https://www.codechef.com/LRNDSA06/problems/FIBNK
code - https://www.codechef.com/viewsolution/37373874
I have tried all test cases manually, and i dont know where i am stuck.
Logic i have used is ,using fibonaci sum , which i am finding out using matrix power and recursion