n = 209.882
t = str(n)  #converting integer into string so we can loop through it.
if t.startswith('-'):  #if it is a negative number 
    t = t[1:]          #slicing it so that - is not considered
t = t.replace('.','')  #for float type ,replacing (.) with empty string
s = 0
for i in t:
    s += int(i)

print(s)