Driver code
public static void Main ( ) { int n = 4 ; int [ ] a1 = { 1 , 1 , 0 , 0 } ; Console . WriteLine ( no_of_ways ( a1 , n ) ) ; n = 5 ; int [ ] a2 = { 1 , 1 , 1 , 0 , 0 } ; Console . WriteLine ( no_of_ways ( a2 , n ) ) ; n = 5 ; int [ ] a3 = { 1 , 1 , 0 , 0 , 0 } ; Console . WriteLine ( no_of_ways ( a3 , n ) ) ; n = 6 ; int [ ] a4 = { 1 , 1 , 1 , 0 , 0 , 0 } ; Console . WriteLine ( no_of_ways ( a4 , n ) ) ; } }