import java.util.*; class A{ static Scanner s=new Scanner(System.in); public static void main(String[] $){ System.out.println(s.next().chars().map(o->o=='0'?10:o-'0').sum()); } }