P3263 [JLOI2015] Meaningful String

Description

Mr. B has two good friends, named Ningning and Ranran. One day, Ranran encountered an interesting problem: given three non-negative integers $b,d,n$, compute $$\left\lfloor \left ( \frac{b+\sqrt{d}}{2} \right ) ^n \right\rfloor \bmod p,$$ where $p=7,528,443,412,579,576,937$.

Input Format

One line containing three non-negative integers $b$, $d$, and $n$.

Output Format

Output a single integer denoting the result modulo 7,528,443,412,579,576,937.

Explanation/Hint

It is guaranteed that $0