import java.util.Scanner; class Y289{ public static void main(String[] args){ char[] str = new Scanner(System.in).next().toCharArray(); int sum = 0; for(char c:str)if(c >= '1' && c <= '9')sum += c - '0'; System.out.println(sum); } }