Driver Code
int main ( ) { long long n = 4 ; long long base = fib ( n , mod ) % mod ; long long expo = fib ( n , mod - 1 ) % ( mod - 1 ) ; long long result = modularexpo ( base , expo , mod ) % mod ; cout << result << endl ; }