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