input: from typing import List
  
  
  def sum_of_digits(number: int) -> int:
      """ Calculate the sum of the digits of a given number.
      >>> sum_of_digits(6342)
      15
      >>> sum_of_digits(123)
      6
      """
output:     total = 0
      while number > 0:
          total += number % 10
          number //= 10
      return total