import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    } main {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int P = sc.nextInt(); P sc.nextInt() sc.nextInt sc int Q = sc.nextInt(); Q sc.nextInt() sc.nextInt sc int R = sc.nextInt(); R sc.nextInt() sc.nextInt sc int min = Math.min(P+Q, Math.min(Q+R, R+P)); min Math.min(P+Q, Math.min(Q+R, R+P)) Math.min Math P+Q P Q Math.min(Q+R, R+P) Math.min Math Q+R Q R R+P R P System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        
        int min = Math.min(P+Q, Math.min(Q+R, R+P));
        System.out.println(min);
    }
}
