import java.util.*;

public class Main{
  public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  }
} Main public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  } main {
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int p = scan.nextInt(); p scan.nextInt() scan.nextInt scan int q = scan.nextInt(); q scan.nextInt() scan.nextInt scan int r = scan.nextInt(); r scan.nextInt() scan.nextInt scan int con = p + q + r - Math.max(p,Math.max(q,r)); con p + q + r - Math.max(p,Math.max(q,r)) p + q + r p + q + r p q r Math.max(p,Math.max(q,r)) Math.max Math p Math.max(q,r) Math.max Math q r System.out.println(con) System.out.println System.out System System.out con String[] arts arts public class Main{
  public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  }
} public class Main{
  public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] arts){
    Scanner scan = new Scanner(System.in);
    int p = scan.nextInt();
    int q = scan.nextInt();
    int r = scan.nextInt();
    int con = p + q + r - Math.max(p,Math.max(q,r));
    
    System.out.println(con);
  }
}