import strutils let s = readLine stdin var result = 0 for c in s: if c == '0': result.inc 10 else: result.inc parseInt $c echo result