def sum_digits(n: int) -> int:
    """Returns the sum of the digits of non-negative integer n."""
    assert not n < 0, "Non-negative integer n only."
    if n < 10:
        return n
    return n % 10 + sum_digits(n // 10)