function that returns ( n + 1 ) th Fibonacci number Or number of ways to represent n as sum of 1 ' s ▁ 2' s
function countWays ( n ) { var F = [ [ 1 , 1 ] , [ 1 , 0 ] ] ; if ( n == 0 ) { return 0 ; } power ( F , n ) ; return F [ 0 ] [ 0 ] ; }