Count of N | Java implementation of the approach ; Function to return the count of possible numbers ; Driver code
class GFG { static int count ( int n ) { return ( int ) Math . pow ( 2 , n - 1 ) ; } public static void main ( String [ ] args ) { int n = 4 ; System . out . println ( count ( n ) ) ; } }