package yukicoder import java.util.Scanner object q289 { def main(args: Array[String]) = { val sc = new Scanner(System.in) var str = sc.next() println(str.filter(ch => ch >= '1' && ch <= '9').map(_ - '0').sum) } }