import java.util.Scanner;
import java.lang.*;

public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    }
} import java.util.Scanner; Scanner java.util import java.lang.*; lang.* java public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    }
} Main public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    } main {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String[] inputs = input.split(" "); inputs input.split(" ") input.split input " " int P = Integer.parseInt(inputs[0]); P Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int Q = Integer.parseInt(inputs[1]); Q Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 int R = Integer.parseInt(inputs[2]); R Integer.parseInt(inputs[2]) Integer.parseInt Integer inputs[2] inputs 2 int min1 = Math.min(P,Q); min1 Math.min(P,Q) Math.min Math P Q int max1 = Math.max(P,Q); max1 Math.max(P,Q) Math.max Math P Q if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } max1 <=  R max1 R {
                System.out.println(min1 + max1);
            } System.out.println(min1 + max1) System.out.println System.out System System.out min1 + max1 min1 max1 {
                System.out.println(min1 + R);
            } System.out.println(min1 + R) System.out.println System.out System System.out min1 + R min1 R scanner.close() scanner.close scanner String[] args args public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    }
} public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    }
} Main
import java.util.Scanner;
import java.lang.*;

public class Main {

    public static void main(String[] args) {

            Scanner scanner = new Scanner(System.in);
            String input = scanner.nextLine();
            String[] inputs = input.split(" ");

            int P = Integer.parseInt(inputs[0]);
            int Q = Integer.parseInt(inputs[1]);
            int R = Integer.parseInt(inputs[2]);

            int min1 = Math.min(P,Q);
            int max1 = Math.max(P,Q); 

            if (max1 <=  R) {
                System.out.println(min1 + max1);
            } else {
                System.out.println(min1 + R);
            } 
            
            scanner.close();
    }
}