import java.util.*; class No0289{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); char[] s = str.toCharArray(); int result = 0; for(int i = 0; i < s.length; i++){ if(s[i] >= '0' && s[i] <= '9') result += s[i] - '0'; } System.out.println(result); } }