import java.util.Scanner;

//  ABC 081 A - Placing Marbles

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  }
} import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  }
} Main public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  } main {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String a = sc.next(); a sc.next() sc.next sc int index = 0; index 0 int count = 0; count 0 while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   } true {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   } index = a.indexOf("1", index) + 1 index a.indexOf("1", index) + 1 a.indexOf("1", index) a.indexOf a "1" index 1 if(index == 0) break; index == 0 index 0 break; count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  }
} public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  }
} Main
import java.util.Scanner;

//  ABC 081 A - Placing Marbles

public class Main {
  public static void main(String[] args ) throws Exception {
    Scanner sc = new Scanner(System.in);
    String a = sc.next();
    int index = 0;
	int count = 0;

   while(true) {
	   index = a.indexOf("1", index) + 1;
	   if(index == 0) break;
	   count++;
   }
   System.out.println(count);
  }
}