def diff21(n: int) -> int:
    """Absolute difference between n and 21.

    Returns abs(n-21) if n <= 21 and abs(n-21) * 2 if n > 21.
    """
    diff = abs(n - 21)
    if n > 21:
        return diff * 2
    return diff