import java.util.Scanner object no289{ def main(args:Array[String]):Unit={ val scan = new Scanner(System.in) println(scan.next.filter(c=>c.isDigit).map(c=>c-'0').sum) } }