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

		int halfResult = Math.min(P + Q, Q + R);
		int result = Math.min(halfResult, R + P);
		System.out.println(result);
	} 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 halfResult = Math.min(P + Q, Q + R); halfResult Math.min(P + Q, Q + R) Math.min Math P + Q P Q Q + R Q R int result = Math.min(halfResult, R + P); result Math.min(halfResult, R + P) Math.min Math halfResult R + P R P System.out.println(result) System.out.println System.out System System.out result 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 halfResult = Math.min(P + Q, Q + R);
		int result = Math.min(halfResult, R + P);
		System.out.println(result);
	}
} 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 halfResult = Math.min(P + Q, Q + R);
		int result = Math.min(halfResult, R + P);
		System.out.println(result);
	}
} 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 halfResult = Math.min(P + Q, Q + R);
		int result = Math.min(halfResult, R + P);
		System.out.println(result);
	}
}