text: Expected Number of Trials to get N Consecutive Heads | C # implementation of the above approach ; Driver Code ; Formula for number of trails for N consecutive heads
code: using System ; class GFG { public static void Main ( ) { int N = 3 ; Console . Write ( Math . Pow ( 2 , N + 1 ) - 2 ) ; } }