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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    }
}      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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    }
} 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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    } main {
		Scanner sc = new Scanner(System.in);
      int P = sc.nextInt();
      int Q = sc.nextInt();
      int R = sc.nextInt();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    } 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 if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      } P>=Q && P>=R P>=Q P Q P>=R P R {
        System.out.println(Q+R);
      } System.out.println(Q+R) System.out.println System.out System System.out Q+R Q R if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      } Q>=P && Q>=R Q>=P Q P Q>=R Q R {
        System.out.println(P+R);
      } System.out.println(P+R) System.out.println System.out System System.out P+R P R if(R>=P && R>=Q){
        System.out.println(P+Q);
      } R>=P && R>=Q R>=P R P R>=Q R Q {
        System.out.println(P+Q);
      } System.out.println(P+Q) System.out.println System.out System System.out P+Q P Q 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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    }
} 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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    }
} 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();
      if(P>=Q && P>=R){
        System.out.println(Q+R);
      }else if(Q>=P && Q>=R){
        System.out.println(P+R);
      }else if(R>=P && R>=Q){
        System.out.println(P+Q);
      }
    }
}     