import java.util.*;

public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      }
} Main public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      } main {
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int P = sc.nextInt(); P sc.nextInt() sc.nextInt sc int Q = sc.nextInt(); Q sc.nextInt() sc.nextInt sc int R = sc.nextInt(); R sc.nextInt() sc.nextInt sc int a = P+Q; a P+Q P Q int b = P+R; b P+R P R int c = Q+R; c Q+R Q R if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      } a<=b && a<=c a<=b a b a<=c a c {
    System.out.println(a);
      } System.out.println(a) System.out.println System.out System System.out a if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      } b<=c && b<=a b<=c b c b<=a b a {
	System.out.println(b);
      } System.out.println(b) System.out.println System.out System System.out b {
    System.out.println(c);
      } System.out.println(c) System.out.println System.out System System.out c String[] args args public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      }
} public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args){
    
    Scanner sc = new Scanner(System.in);
    int P = sc.nextInt();
    int Q = sc.nextInt();
    int R = sc.nextInt(); 

      int a = P+Q;
      int b = P+R;
      int c = Q+R;
      
      if(a<=b && a<=c){
    System.out.println(a);
      }else if(b<=c && b<=a){
	System.out.println(b);
      }else{
    System.out.println(c);
      }
      }
}