import java.io.*; import java.util.*; public class Main_yukicoder656 { private static Scanner sc; private static Printer pr; private static void solve() { char[] s = sc.next().toCharArray(); int ans = 0; for (char c : s) { if (c == '0') { ans += 10; } else { ans += c - '0'; } } pr.println(ans); } // --------------------------------------------------- public static void main(String[] args) { sc = new Scanner(System.in); pr = new Printer(System.out); solve(); pr.close(); sc.close(); } private static class Printer extends PrintWriter { Printer(PrintStream out) { super(out); } } }