import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	} main {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int p = stdIn.nextInt(); p stdIn.nextInt() stdIn.nextInt stdIn int q = stdIn.nextInt(); q stdIn.nextInt() stdIn.nextInt stdIn int r = stdIn.nextInt(); r stdIn.nextInt() stdIn.nextInt stdIn int a = p+q; a p+q p q int b = q+r; b q+r q r int c = p+r; c p+r p r int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE min = Math.min(a, b) min Math.min(a, b) Math.min Math a b min = Math.min(min, c) min Math.min(min, c) Math.min Math min c System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	}

} public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	}

} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int p = stdIn.nextInt();
		int q = stdIn.nextInt();
		int r = stdIn.nextInt();
		
		int a = p+q;
		int b = q+r;
		int c = p+r;
		
		int min = Integer.MAX_VALUE;
		min = Math.min(a, b);
		min = Math.min(min, c);
		
		System.out.println(min);
		
		
		
		
		
	}

}
