import sequtils,strutils proc f(c : char) : bool = c < 'A' var s = stdin.readLine.filter f var sum = 0 for c in s: sum += ($c).parseInt echo sum