```python
def rearrange_bigger(n):
    s_digits = list(str(n))
    num_digits = len(s_digits)

    # Find the rightmost digit that is smaller than the digit to its right (the pivot).
    pivot_index = -1
    for i in range(num_digits - 2, -1, -1):
        if s_digits[i] < s_digits[i + 1]:
            pivot_index = i
            break

    # If no such pivot exists, the number is the largest possible permutation.
    if pivot_index == -1:
        return n

    # Find the smallest digit to the right of the pivot that is larger than the pivot.
    for j in range(num_digits - 1, pivot_index, -1):
        if s_digits[j] > s_digits[pivot_index]:
            swap_index = j
            break
    
    # Swap the pivot with the found digit.
    s_digits[pivot_index], s_digits[swap_index] = s_digits[swap_index], s_digits[pivot_index]

    # Reverse the part of the list to the right of the pivot's original position.
    left, right = pivot_index + 1, num_digits - 1
    while left < right:
        s_digits[left], s_digits[right] = s_digits[right], s_digits[left]
        left += 1
        right -= 1
    
    # Join the digits and convert back to an integer.
    return int("".join(s_digits))
```