import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	}

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

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	}

} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	} main {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	} 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 result; result int a = p+q; a p+q p q int b = q+r; b q+r q r int c = r+p; c r+p r p if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		} a<=b a b {
			result = a;
			if(c<=a) {
				result = c;
			}
		} result = a result a if(c<=a) {
				result = c;
			} c<=a c a {
				result = c;
			} result = c result c {
			result = b;
			if(c<=b) {
				result = c;
			}
		} result = b result b if(c<=b) {
				result = c;
			} c<=b c b {
				result = c;
			} result = c result c System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	}

} public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	}

} Main
import java.util.Scanner;

public class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int result;

		int a = p+q;
		int b = q+r;
		int c = r+p;

		if(a<=b) {
			result = a;
			if(c<=a) {
				result = c;
			}
		}else {
			result = b;
			if(c<=b) {
				result = c;
			}
		}

		System.out.println(result);
	}

}
