Driver code
public static void Main ( ) { long n ; n = 5 ; Console . WriteLine ( nthTerm ( n ) ) ; n = 25 ; Console . WriteLine ( nthTerm ( n ) ) ; n = 25000000 ; Console . WriteLine ( nthTerm ( n ) ) ; n = 250000007 ; Console . WriteLine ( nthTerm ( n ) ) ; } }