תשובה אחת
##########
# first #
##########

amount_out_of_two = int(input('two digit number: '))

print(int(str(amount_out_of_two)[0]) + int(str(amount_out_of_two)[1]))


##########
# second #
##########

amount_out_of_three = int(input('three digit number: '))

print(int(str(amount_out_of_three)[0]) + int(str(amount_out_of_three)[1]) + int(str(amount_out_of_three)[2]))