import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		sc.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		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 ArrayList<Integer> ary = new ArrayList<Integer>(); ary new ArrayList<Integer>() int sum1 = P + Q; sum1 P + Q P Q int sum2 = R + Q; sum2 R + Q R Q int sum3 = P + R; sum3 P + R P R int sum4 = Q + R; sum4 Q + R Q R int sum5 = R + P; sum5 R + P R P int sum6 = Q + P; sum6 Q + P Q P ary.add(sum1) ary.add ary sum1 ary.add(sum2) ary.add ary sum2 ary.add(sum3) ary.add ary sum3 ary.add(sum4) ary.add ary sum4 ary.add(sum5) ary.add ary sum5 ary.add(sum6) ary.add ary sum6 Collections.sort(ary) Collections.sort Collections ary System.out.println(ary.get(0)) System.out.println System.out System System.out ary.get(0) ary.get ary 0 sc.close() sc.close sc String[] args args public class Main {

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		sc.close();
	}
} public class Main {

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		sc.close();
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

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

		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		ArrayList<Integer> ary = new ArrayList<Integer>();

		int sum1 = P + Q;
		int sum2 = R + Q;
		int sum3 = P + R;
		int sum4 = Q + R;
		int sum5 = R + P;
		int sum6 = Q + P;

		ary.add(sum1);
		ary.add(sum2);
		ary.add(sum3);
		ary.add(sum4);
		ary.add(sum5);
		ary.add(sum6);

		Collections.sort(ary);

		System.out.println(ary.get(0));

		sc.close();
	}
}