import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    } main {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int P = Integer.parseInt(scanner.next()); P Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner int Q = Integer.parseInt(scanner.next()); Q Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner int R = Integer.parseInt(scanner.next()); R Integer.parseInt(scanner.next()) Integer.parseInt Integer scanner.next() scanner.next scanner scanner.close() scanner.close scanner int[] arr = {P, Q, R}; arr {P, Q, R} P Q R Arrays.sort(arr) Arrays.sort Arrays arr System.out.println(arr[0] + arr[1]) System.out.println System.out System System.out arr[0] + arr[1] arr[0] arr 0 arr[1] arr 1 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

        System.out.println(arr[0] + arr[1]);
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int P = Integer.parseInt(scanner.next());
        int Q = Integer.parseInt(scanner.next());
        int R = Integer.parseInt(scanner.next());
        scanner.close();

        int[] arr = {P, Q, R};
        Arrays.sort(arr);

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