```python
def get_pell(n):
    """
    Calculates the nth Pell number.

    Pell numbers are defined by the recurrence relation:
    P(n) = 2 * P(n-1) + P(n-2)
    with base cases P(0) = 0 and P(1) = 1.

    Args:
        n: A non-negative integer index.

    Returns:
        The nth Pell number.
    """
    if n < 0:
        # Pell numbers are not defined for negative indices.
        # Depending on requirements, one might raise an error or return a specific value.
        # For this implementation, we'll handle it gracefully by returning None or raising an error.
        # Let's raise a ValueError for clarity.
        raise ValueError("Input must be a non-negative integer.")

    if n == 0:
        return 0
    
    # Initialize the first two Pell numbers
    a, b = 0, 1
    
    # Iterate n-1 times to compute the nth Pell number from the base cases
    for _ in range(n - 1):
        a, b = b, 2 * b + a
        
    return b

```