import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;

	void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	}
	
	int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} import java.util.*; util.* java public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;

	void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	}
	
	int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int MOD = 1000000007; MOD 1000000007 final int MAX = Integer.MAX_VALUE; MAX Integer.MAX_VALUE Integer Integer.MAX_VALUE final long LMAX = Long.MAX_VALUE; LMAX Long.MAX_VALUE Long Long.MAX_VALUE void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	} doIt {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	} 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 System.out.println(p + q + r - max3(p, q, r)) System.out.println System.out System System.out p + q + r - max3(p, q, r) p + q + r p + q + r p q r max3(p, q, r) max3 p q r int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	} max3 {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	} int max = ((a < b) ? b : a); max ((a < b) ? b : a) (a < b) a b b a return (max < c)? c : max; (max < c)? c : max (max < c) max c c max int a a int b b int c c public static void main(String[] args) {
		new Main().doIt();
	} main {
		new Main().doIt();
	} new Main().doIt() new Main().doIt new Main() String[] args args public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;

	void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	}
	
	int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;

	void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	}
	
	int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
} Main
import java.util.*;

public class Main {
	Scanner sc = new Scanner(System.in);
	final int MOD = 1000000007;
	final int MAX = Integer.MAX_VALUE;
	final long LMAX = Long.MAX_VALUE;

	void doIt() {
		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		System.out.println(p + q + r - max3(p, q, r));
	}
	
	int max3(int a, int b, int c) {
		int max = ((a < b) ? b : a);
		return (max < c)? c : max;
	}
	
	public static void main(String[] args) {
		new Main().doIt();
	}
}
