import java.util.Scanner;

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

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  } main {
    Scanner sc = new Scanner(System.in);

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc char[] chars = s.toCharArray(); chars s.toCharArray() s.toCharArray s int result = 0; result 0 if (chars[0] == '1') {
      result++;
    } chars[0] == '1' chars[0] chars 0 '1' {
      result++;
    } result++ result if (chars[1] == '1') {
      result++;
    } chars[1] == '1' chars[1] chars 1 '1' {
      result++;
    } result++ result if (chars[2] == '1') {
      result++;
    } chars[2] == '1' chars[2] chars 2 '1' {
      result++;
    } result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  }
} Main
import java.util.Scanner;

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

    String s = sc.nextLine();
    char[] chars = s.toCharArray();

    int result = 0;
    if (chars[0] == '1') {
      result++;
    }
    if (chars[1] == '1') {
      result++;
    }
    if (chars[2] == '1') {
      result++;
    }
    System.out.println(result);
  }
}