Given an array `nums` of n+1 integers where each value is in the range 1..n, exactly one value is repeated (possibly more than once). Return that repeated number without modifying the array and using O(1) extra space.