import java.util.Scanner;

public class Main {

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

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

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

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

public class Main {

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