import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    } 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 ans = Math.min(P + Q, Q + R); ans Math.min(P + Q, Q + R) Math.min Math P + Q P Q Q + R Q R ans = Math.min(ans, R + P) ans Math.min(ans, R + P) Math.min Math ans R + P R P System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        int Q = sc.nextInt();
        int R = sc.nextInt();
        int ans = Math.min(P + Q, Q + R);
        ans = Math.min(ans, R + P);
        System.out.print(ans);
    }
} Main
import java.util.Scanner;

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