import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  } main {
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int a = s - 9 * (s / 100) - 9 * (s / 10); a s - 9 * (s / 100) - 9 * (s / 10) s - 9 * (s / 100) - 9 * (s / 10) s 9 * (s / 100) 9 (s / 100) s 100 9 * (s / 10) 9 (s / 10) s 10 System.out.println(a) System.out.println System.out System System.out a sc.close() sc.close sc String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int s = sc.nextInt();
    int a = s - 9 * (s / 100) - 9 * (s / 10);
    System.out.println(a);
    sc.close();
  }
}
