Driver Code
public static void main ( String [ ] args ) { long n = 4 ; long base = fib ( n , mod ) % mod ; long expo = fib ( n , mod - 1 ) % ( mod - 1 ) ; long result = modularexpo ( base , expo , mod ) % mod ; System . out . println ( result ) ; } }