Code for Count Number of Binary Strings gives wrong answer

My code for the above mentioned problem is giving a wrong answer for 2 out of 3 test cases and I am not sure why, please help.

My code : https://ide.codingblocks.com/s/460236

hello @Yash5646
use long long .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.