(print (let loop([n (read)]) (if (zero? n) 0 (+ (remainder n 10) (loop (quotient n 10))))))