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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	}
} 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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	}
} 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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	} main {
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	} 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 result_1 = P + Q; result_1 P + Q P Q int result_2 = Q + R; result_2 Q + R Q R int result_3 = R + P; result_3 R + P R P int output = Math.min(result_1,(Math.min(result_2,result_3))); output Math.min(result_1,(Math.min(result_2,result_3))) Math.min Math result_1 (Math.min(result_2,result_3)) Math.min Math result_2 result_3 System.out.println(output) System.out.println System.out System System.out output 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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	}
} 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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	}
} 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 result_1 = P + Q;
		int result_2 = Q + R;
		int result_3 = R + P;
		int output = Math.min(result_1,(Math.min(result_2,result_3)));
      System.out.println(output);
	}
}