import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    }

} Main public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    } main {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int P = scanner.nextInt(); P scanner.nextInt() scanner.nextInt scanner int Q = scanner.nextInt(); Q scanner.nextInt() scanner.nextInt scanner int R = scanner.nextInt(); R scanner.nextInt() scanner.nextInt scanner scanner.close() scanner.close scanner int min =Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE min = Math.min((P+Q),min) min Math.min((P+Q),min) Math.min Math (P+Q) P Q min min = Math.min((Q+R),min) min Math.min((Q+R),min) Math.min Math (Q+R) Q R min min = Math.min((R+P),min) min Math.min((R+P),min) Math.min Math (R+P) R P min System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    }

} public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
//        long startTime = System.currentTimeMillis();
        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();
        scanner.close();

        int min =Integer.MAX_VALUE;

        min = Math.min((P+Q),min);
        min = Math.min((Q+R),min);
        min = Math.min((R+P),min);

        System.out.println(min);

//        System.out.println(System.currentTimeMillis() - startTime);
    }

}
