import java.util.*;
public class Main{
	public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    }
} import java.util.*; util.* java public class Main{
	public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    }
} Main public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    } main {
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan int cnt = 0; cnt 0 boolean a = num > 99; a num > 99 num 99 if(a){
          	cnt++;
        	num = num - 100;
        } a {
          	cnt++;
        	num = num - 100;
        } cnt++ cnt num = num - 100 num num - 100 num 100 boolean b = num > 9; b num > 9 num 9 if(b){
      		num = num - 10;
        	cnt++;
      	} b {
      		num = num - 10;
        	cnt++;
      	} num = num - 10 num num - 10 num 10 cnt++ cnt boolean c = num == 1; c num == 1 num 1 if(c){ cnt ++;} c { cnt ++;} cnt ++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String args[] args public class Main{
	public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    }
} public class Main{
	public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    }
} Main
import java.util.*;
public class Main{
	public static void main(String args[]){
    	Scanner scan = new Scanner(System.in);
      	int num = scan.nextInt();
      	int cnt = 0;
        boolean a = num > 99;
      	if(a){
          	cnt++;
        	num = num - 100;
        }
      	boolean b = num > 9;
	    if(b){
      		num = num - 10;
        	cnt++;
      	}
      	boolean c = num == 1;
      	if(c){ cnt ++;}
        System.out.println(cnt);
    }
}