Task: Program Execution
Input (English): n, g, d
Output (English): -1