```python
def sum_digits_single(x):
    """
    Divides a number x into two parts a and b (a+b=x) such that the sum of
    their digits is maximized.
    """

    def get_sum_of_digits(n):
        """
        Helper function to calculate the sum of digits of a non-negative number.
        """
        return sum(int(digit) for digit in str(n))

    # The strategy to maximize the sum of digits of the two parts is to
    # construct one part to be a number consisting of as many 9s as possible.
    # This maximizes the number of carries in the addition `a + b = x`, which
    # in turn maximizes `sum_digits(a) + sum_digits(b)`.

    # The number of digits in `x` determines the size of this part.
    # For x=0, str(x) is "0", and its length is 1.
    s = str(x)
    num_digits = len(s)
    
    # We form one part, `part_a`, as a number with `num_digits - 1` nines.
    # This is equivalent to 10**(num_digits - 1) - 1.
    # For example, if x = 492 (3 digits), part_a is 10**2 - 1 = 99.
    # If x = 9 (1 digit), part_a is 10**0 - 1 = 0.
    part_a = 10**(num_digits - 1) - 1
    
    # The second part, `part_b`, is the remainder.
    part_b = x - part_a
    
    # The result is the sum of the digits of these two optimally chosen parts.
    return get_sum_of_digits(part_a) + get_sum_of_digits(part_b)

```