def sum_of_digits(number):
    """
    Calculating sum of digits of number
    """
    sum = 0
    number = abs(number)
    while number > 0:
        sum += number % 10
        number = number // 10
    return sum