Count Number of Binary Strings

https://ide.codingblocks.com/s/189004

this is my code for Count Number of Binary Strings question. May I know what is the error in my code as my 2 test case are failing