import java.io.*; class N656{ public static void main(String args[])throws IOException { String in; InputStreamReader is = new InputStreamReader(System.in); //(1) BufferedReader br = new BufferedReader(is); //(2) in = br.readLine(); int sum = 0; for(int i = 0; i < 9; i++){ String c = in.substring(i,i+1); if(c.equals("0")){ sum += 10; }else{ sum += Integer.parseInt(c); } } System.out.println(sum); } }