Capitalized identifier name for an integer variable would be unprecedented.

Also, as `R` is never referenced in the loop body, I would go with `foreach(i, ref r; _input)` which also shaves one line of code.