import java.util.Arrays;
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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	}

} import java.util.Arrays; Arrays java.util 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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	}

} 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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	} main {
		Scanner sc = new Scanner(System.in);
		
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		
		int[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	} 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[] i = {P,Q,R}; i {P,Q,R} P Q R Arrays.sort(i) Arrays.sort Arrays i System.out.println(i[0] + i[1]) System.out.println System.out System System.out i[0] + i[1] i[0] i 0 i[1] i 1 sc.close() sc.close sc 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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	}

} 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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	}

} Main
import java.util.Arrays;
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[] i = {P,Q,R};
		Arrays.sort(i);
		System.out.println(i[0] + i[1]);
		
		sc.close();
		
	}

}
