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