import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	}
} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections 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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	}
} 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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		ArrayList<Integer> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	} 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> list = new ArrayList<>(); list new ArrayList<>() list.add(P + Q) list.add list P + Q P Q list.add(P + R) list.add list P + R P R list.add(Q + R) list.add list Q + R Q R Integer i = Collections.min(list); i Collections.min(list) Collections.min Collections list System.out.println(i) System.out.println System.out System System.out i 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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	}
} 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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	}
} Main
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;

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> list = new ArrayList<>();
		list.add(P + Q);
		list.add(P + R);
		list.add(Q + R);

		Integer i = Collections.min(list);
		System.out.println(i);
	}
}
