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

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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    }
} import java.util.*; util.* java import java.lang.*; lang.* java 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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    }
} 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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

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

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    } 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 List<Integer> time = new ArrayList<>(); time new ArrayList<>() time.add(P+Q) time.add time P+Q P Q time.add(Q+R) time.add time Q+R Q R time.add(R+P) time.add time R+P R P System.out.println(Collections.min(time)) System.out.println System.out System System.out Collections.min(time) Collections.min Collections time 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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    }
} 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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    }
} Main
import java.util.*;
import java.lang.*;

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();

        List<Integer> time = new ArrayList<>();
        time.add(P+Q);
        time.add(Q+R);
        time.add(R+P);

        System.out.println(Collections.min(time));

    }
}