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