import java.util.*;

public class Main {

    public static List<List<Integer>> switchList;

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

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    }

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

    public static List<List<Integer>> switchList;

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

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    }

} Main public static List<List<Integer>> switchList; switchList public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        sc.close();

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    } main {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        sc.close();

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    } 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 sc.close() sc.close sc int[] array = new int[3]; array new int[3] 3 array[0] = P array[0] array 0 P array[1] = Q array[1] array 1 Q array[2] = R array[2] array 2 R Arrays.sort(array) Arrays.sort Arrays array System.out.println(array[0] + array[1]) System.out.println System.out System System.out array[0] + array[1] array[0] array 0 array[1] array 1 String[] args args public class Main {

    public static List<List<Integer>> switchList;

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

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    }

} public class Main {

    public static List<List<Integer>> switchList;

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

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    }

} Main
import java.util.*;

public class Main {

    public static List<List<Integer>> switchList;

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

        int[] array = new int[3];
        array[0] = P;
        array[1] = Q;
        array[2] = R;

        Arrays.sort(array);

        System.out.println(array[0] + array[1]);
    }

}