import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	}


} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	}


} Main public static void main(String[] args) {
		Main main = new Main();
		main.run();
	} main {
		Main main = new Main();
		main.run();
	} Main main = new Main(); main new Main() main.run() main.run main String[] args args public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	} run {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		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 a=0; a 0 int b=0; b 0 if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		} P <= Q P Q {
			a=P;
			b=Q;
		} a=P a P b=Q b Q {
			a=Q;
			b=P;
		} a=Q a Q b=P b P if(R <= b) {
			b =R;
		} R <= b R b {
			b =R;
		} b =R b R System.out.println(a+b) System.out.println System.out System System.out a+b a b sc.close() sc.close sc public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	}


} public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	}


} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int P=sc.nextInt();
		int Q=sc.nextInt();
		int R=sc.nextInt();

		int a=0;
		int b=0;
		if(P <= Q) {
			a=P;
			b=Q;
		}else {
			a=Q;
			b=P;
		}
		if(R <= b) {
			b =R;
		}
		System.out.println(a+b);
		sc.close();
	}


}
