import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	}
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	} main {
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int s0 = Integer.parseInt(s.substring(0, 1)); s0 Integer.parseInt(s.substring(0, 1)) Integer.parseInt Integer s.substring(0, 1) s.substring s 0 1 int s1 = Integer.parseInt(s.substring(1, 2)); s1 Integer.parseInt(s.substring(1, 2)) Integer.parseInt Integer s.substring(1, 2) s.substring s 1 2 int s2 = Integer.parseInt(s.substring(2, 3)); s2 Integer.parseInt(s.substring(2, 3)) Integer.parseInt Integer s.substring(2, 3) s.substring s 2 3 int s_t = s0 + s1 + s2; s_t s0 + s1 + s2 s0 + s1 + s2 s0 s1 s2 System.out.print(s_t) System.out.print System.out System System.out s_t String args[] args public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	}
} Main
import java.util.*;

public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);

		String s = sc.next();
      
		int s0 = Integer.parseInt(s.substring(0, 1));
		int s1 = Integer.parseInt(s.substring(1, 2));
		int s2 = Integer.parseInt(s.substring(2, 3));

		int s_t = s0 + s1 + s2;
		System.out.print(s_t);

	}
}