import java.lang.reflect.Array;
import java.util.*;
import static java.lang.Math.*;

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 count =0;
            if(P + Q <= Q + R && P+Q<= P+R) {
                System.out.println(P + Q);
            }else if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            }
      

    }
} import java.lang.reflect.Array; Array java.lang.reflect import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; 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 count =0;
            if(P + Q <= Q + R && P+Q<= P+R) {
                System.out.println(P + Q);
            }else if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            }
      

    }
} 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 count =0;
            if(P + Q <= Q + R && P+Q<= P+R) {
                System.out.println(P + Q);
            }else if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            }
      

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

    } 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 count =0; count 0 if(P + Q <= Q + R && P+Q<= P+R) {
                System.out.println(P + Q);
            }else if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            } P + Q <= Q + R && P+Q<= P+R P + Q <= Q + R P + Q P Q Q + R Q R P+Q<= P+R P+Q P Q P+R P R {
                System.out.println(P + Q);
            } System.out.println(P + Q) System.out.println System.out System System.out P + Q P Q if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            } Q+R <= P+Q && Q+R <= P+R Q+R <= P+Q Q+R Q R P+Q P Q Q+R <= P+R Q+R Q R 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 {
                System.out.println(P+R);
            } System.out.println(P+R) System.out.println System.out System System.out P+R P R String[] args args
import java.lang.reflect.Array;
import java.util.*;
import static java.lang.Math.*;

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 count =0;
            if(P + Q <= Q + R && P+Q<= P+R) {
                System.out.println(P + Q);
            }else if(Q+R <= P+Q && Q+R <= P+R){
                System.out.println(Q+R);
            }else{
                System.out.println(P+R);
            }
      

    }
}
