Task: Program Execution
Input (English): n, 513, J, 1609, N, r, H, W, n, g, h, 4787, T
Output (English): 2, 4, 12