import java.util.*; import java.util.stream.*; public class Main{ public static void main(String... args){ Scanner sc=new Scanner(System.in); String s=sc.next(); int ans=0; for(char c:s.toCharArray()){ if(Character.isDigit(c))ans+=(c-'0'); } System.out.println(ans); } }