import java.util.*;
import java.lang.*;
import java.io.*;

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

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    }
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();//A to B
        int Q = sc.nextInt();//B to C
        int R = sc.nextInt();//C to A

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();//A to B
        int Q = sc.nextInt();//B to C
        int R = sc.nextInt();//C to A

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    } main {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();//A to B
        int Q = sc.nextInt();//B to C
        int R = sc.nextInt();//C to A

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    } 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 PQ = P+Q; PQ P+Q P Q int QR = Q+R; QR Q+R Q R int RP = R+P; RP R+P R P int m1 = Math.min(PQ,QR); m1 Math.min(PQ,QR) Math.min Math PQ QR int m2 = Math.min(QR,RP); m2 Math.min(QR,RP) Math.min Math QR RP int m3 = Math.min(m1,m2); m3 Math.min(m1,m2) Math.min Math m1 m2 System.out.println(m3) System.out.println System.out System System.out m3 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();//A to B
        int Q = sc.nextInt();//B to C
        int R = sc.nextInt();//C to A

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

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

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    }
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

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

        int PQ = P+Q;
        int QR = Q+R;
        int RP = R+P;

        int m1 = Math.min(PQ,QR);
        int m2 = Math.min(QR,RP);
        int m3 = Math.min(m1,m2);

        System.out.println(m3);
        

    }
}
