# Arup Guha
# 10/1/2020
# Finds the sum of digits of a number.

# Get input.
n = int(input("Enter a positive integer.\n"))

# Accumulator for sum.
sumDigits = 0

# Store this since I will lose it otherwise.
saveN = n

# Keep on going until we peel off each digit.
while n > 0:

    # Add in the last digit.
    sumDigits = sumDigits + n%10

    # Now we can peel off that digit.
    n = n//10

# Print the result.
print("The sum of digits of",saveN,"is",sumDigits)
