import java.io.*;
 
public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  }
} import java.io.*; io.* java public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  }
} Main public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br int zero = 0; zero 0 for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    } int i = 0; int i = 0; i 0 i<input.length() i input.length() input.length input i++ i++ i {
      if(input.indexOf('1',i) == i){
        zero++;
      }
    } {
      if(input.indexOf('1',i) == i){
        zero++;
      }
    } if(input.indexOf('1',i) == i){
        zero++;
      } input.indexOf('1',i) == i input.indexOf('1',i) input.indexOf input '1' i i {
        zero++;
      } zero++ zero System.out.println(zero) System.out.println System.out System System.out zero String[] args args public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  }
} public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  }
} Main
import java.io.*;
 
public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    int zero = 0;
    for(int i = 0; i<input.length(); i++){
      if(input.indexOf('1',i) == i){
        zero++;
      }
    }
	System.out.println(zero);
  }
}
