modular_pow that takes a base x, an exponent y, and a modulus m and returns x^y mod m using the binary exponentiation method.even_count = (n + 1) // 2.odd_count = n // 2.even_result = modular_pow(5, even_count, 10^9 + 7).odd_result = modular_pow(4, odd_count, 10^9 + 7).(even_result * odd_result) mod (10^9 + 7).