import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    }
} Main public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    } main {
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    } Scanner Ent = new Scanner(System.in); Ent new Scanner(System.in) int P =  Ent.nextInt(); P Ent.nextInt() Ent.nextInt Ent int Q =  Ent.nextInt(); Q Ent.nextInt() Ent.nextInt Ent int R =  Ent.nextInt(); R Ent.nextInt() Ent.nextInt Ent int res1 = P + Q; res1 P + Q P Q int res2 = R + Q; res2 R + Q R Q int res3 = R + P; res3 R + P R P System.out.println(Math.min(res1,Math.min(res2,res3))) System.out.println System.out System System.out Math.min(res1,Math.min(res2,res3)) Math.min Math res1 Math.min(res2,res3) Math.min Math res2 res3 String[] args args public class Main {
    public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    }
} public class Main {
    public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        Scanner Ent = new Scanner(System.in);
        int P =  Ent.nextInt();
        int Q =  Ent.nextInt();
        int R =  Ent.nextInt();
        int res1 = P + Q;
        int res2 = R + Q;
        int res3 = R + P;
        System.out.println(Math.min(res1,Math.min(res2,res3)));
    }
}