import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc String[] spl = s.split(" "); spl s.split(" ") s.split s " " sc.close() sc.close sc int P = Integer.parseInt(spl[0]); P Integer.parseInt(spl[0]) Integer.parseInt Integer spl[0] spl 0 int Q = Integer.parseInt(spl[1]); Q Integer.parseInt(spl[1]) Integer.parseInt Integer spl[1] spl 1 int R = Integer.parseInt(spl[2]); R Integer.parseInt(spl[2]) Integer.parseInt Integer spl[2] spl 2 int A = P + Q; A P + Q P Q int sum1 = P + Q; sum1 P + Q P Q int sum2= Q + R; sum2 Q + R Q R int sum3 = R + P; sum3 R + P R P int ans = 0; ans 0 ans = Math.min(sum1, sum2) ans Math.min(sum1, sum2) Math.min Math sum1 sum2 ans = Math.min(ans, sum3) ans Math.min(ans, sum3) Math.min Math ans sum3 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] spl = s.split(" ");
		sc.close();

		int P = Integer.parseInt(spl[0]);
		int Q = Integer.parseInt(spl[1]);
		int R = Integer.parseInt(spl[2]);
		int A = P + Q;
		int sum1 = P + Q;
		int sum2= Q + R;
		int sum3 = R + P;
		int ans = 0;
		ans = Math.min(sum1, sum2);
		ans = Math.min(ans, sum3);
		System.out.println(ans);
	}
}