Task: Program Execution
Input (English): n, C, f, Q, M, d, r
Output (English): 0