Back to the Problem
The answer is 2N; compute with binary exponentiation since N is huge.
Complexity: O(log N)