def sum_digits(value):
    """
    Sum of digits of given number.

    :param value: integer value (can also be negative)
    :returns: sum of digits of given number

    >>> sum_digits(1024)
    7
    >>> sum_digits(1234567890)
    45
    >>> sum_digits(-1234567890)
    45
    """
    value = abs(value)
    result = 0
    while value > 0:
        result += value % 10
        value //= 10
    return result