import java.util.Scanner;

public class Main {
    private static final Scanner  SC = new Scanner(System.in);
    private static final int P = SC.nextInt();
    private static final int Q = SC.nextInt();
    private static final int R = SC.nextInt();
    
    public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static final Scanner  SC = new Scanner(System.in);
    private static final int P = SC.nextInt();
    private static final int Q = SC.nextInt();
    private static final int R = SC.nextInt();
    
    public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    }
} Main private static final Scanner  SC = new Scanner(System.in); SC new Scanner(System.in) private static final int P = SC.nextInt(); P SC.nextInt() SC.nextInt SC private static final int Q = SC.nextInt(); Q SC.nextInt() SC.nextInt SC private static final int R = SC.nextInt(); R SC.nextInt() SC.nextInt SC public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    } main {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    } int min = P+Q+R; min P+Q+R P+Q+R P Q R int[] p = {P+Q,Q+R,R+P}; p {P+Q,Q+R,R+P} P+Q P Q Q+R Q R R+P R P for(int i:p){
            min = Math.min(min,i);
        } int i p {
            min = Math.min(min,i);
        } {
            min = Math.min(min,i);
        } min = Math.min(min,i) min Math.min(min,i) Math.min Math min i System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    private static final Scanner  SC = new Scanner(System.in);
    private static final int P = SC.nextInt();
    private static final int Q = SC.nextInt();
    private static final int R = SC.nextInt();
    
    public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    }
} public class Main {
    private static final Scanner  SC = new Scanner(System.in);
    private static final int P = SC.nextInt();
    private static final int Q = SC.nextInt();
    private static final int R = SC.nextInt();
    
    public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    }
} Main
import java.util.Scanner;

public class Main {
    private static final Scanner  SC = new Scanner(System.in);
    private static final int P = SC.nextInt();
    private static final int Q = SC.nextInt();
    private static final int R = SC.nextInt();
    
    public static void main(String[] args) {
        int min = P+Q+R;
        int[] p = {P+Q,Q+R,R+P};
        for(int i:p){
            min = Math.min(min,i);
        }
        System.out.println(min);
    }
}