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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	}

} 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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	}

} 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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	} main {

		Scanner scanner = new Scanner(System.in);
		int P      = scanner.nextInt();
		int Q      = scanner.nextInt();
		int R      = scanner.nextInt();
		int sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	} 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 sumA   = P + Q; sumA P + Q P Q int sumB   = Q + R; sumB Q + R Q R int sumC   = P + R; sumC P + R P R int answer = 0; answer 0 if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		} sumA < sumB sumA sumB {
			
			answer = sumA;
		} answer = sumA answer sumA {
			
			answer = sumB;
		} answer = sumB answer sumB if(sumC < answer) {
			
			answer = sumC;
		} sumC < answer sumC answer {
			
			answer = sumC;
		} answer = sumC answer sumC System.out.println(answer) System.out.println System.out System System.out answer 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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	}

} 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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	}

} 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 sumA   = P + Q;
		int sumB   = Q + R;
		int sumC   = P + R;
		int answer = 0;
		
		if(sumA < sumB) {
			
			answer = sumA;
		}else {
			
			answer = sumB;
		}
		
		if(sumC < answer) {
			
			answer = sumC;
		}
		System.out.println(answer);
	}

}
