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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	}

} import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	} 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 List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R)); nums new ArrayList<>(Arrays.asList(P,Q,R)) Collections.sort(nums) Collections.sort Collections nums System.out.println(nums.get(0)+nums.get(1)) System.out.println System.out System System.out nums.get(0)+nums.get(1) nums.get(0) nums.get nums 0 nums.get(1) nums.get nums 1 String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	}

} Main
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		List<Integer> nums = new ArrayList<>(Arrays.asList(P,Q,R));
		Collections.sort(nums);

		System.out.println(nums.get(0)+nums.get(1));

	}

}
