import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    }
} Main public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    } main {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    } 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 int x = Math.max(P, Q); x Math.max(P, Q) Math.max Math P Q if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        } R > x R x {
            System.out.println(P + Q);
        } System.out.println(P + Q) System.out.println System.out System System.out P + Q P Q {
            System.out.println(R + Math.min(P, Q));
        } System.out.println(R + Math.min(P, Q)) System.out.println System.out System System.out R + Math.min(P, Q) R Math.min(P, Q) Math.min Math P Q String[] args args public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    }
} public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int P = scanner.nextInt();
        int Q = scanner.nextInt();
        int R = scanner.nextInt();

        int x = Math.max(P, Q);
        if (R > x) {
            System.out.println(P + Q);
        } else {
            System.out.println(R + Math.min(P, Q));
        }
    }
}