import java.util.*; import java.util.stream.Stream; import java.time.*; import java.time.format.*; public class No656 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); int total = 0; for(int i = 0; i < 9; i++) { if(s.charAt(i) != '0') { total += Character.getNumericValue(s.charAt(i)); }else { total += 10; } } System.out.println(total); } }