import java.util.*; class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int s = in.nextInt(); int ans = 0; for(int i = 1; i <= 9; i++) { int temp = (int)((s % Math.pow(10, i)) / Math.pow(10, i-1)); // System.out.println(temp); if(temp != 0) ans += temp; else ans += 10; } System.out.println(ans); } }