import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  }
} Main public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  } main {
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  } int ans = 0; ans 0 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] s = sc.nextLine().toCharArray(); s sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    } int cnt = 0; int cnt = 0; cnt 0 cnt < s.length cnt s.length s s.length cnt++ cnt++ cnt {
      if(s[cnt] == '1'){
        ans++;
      }
    } {
      if(s[cnt] == '1'){
        ans++;
      }
    } if(s[cnt] == '1'){
        ans++;
      } s[cnt] == '1' s[cnt] s cnt '1' {
        ans++;
      } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc String[] args args public class Main{
  public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  }
} public class Main{
  public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[] args){
    int ans = 0;
    Scanner sc = new Scanner(System.in);
    char[] s = sc.nextLine().toCharArray();
    for(int cnt = 0; cnt < s.length ; cnt++){
      if(s[cnt] == '1'){
        ans++;
      }
    }
    System.out.println(ans);
    sc.close();
  }
}