
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	}

} Main public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	} main {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String[] lines = line.split(" "); lines line.split(" ") line.split line " " int P = Integer.parseInt(lines[0]); P Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 int Q = Integer.parseInt(lines[1]); Q Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 int R = Integer.parseInt(lines[2]); R Integer.parseInt(lines[2]) Integer.parseInt Integer lines[2] lines 2 int min = P + Q + R - (int)Math.max(P, Math.max(Q, R)); min P + Q + R - (int)Math.max(P, Math.max(Q, R)) P + Q + R P + Q + R P Q R (int)Math.max(P, Math.max(Q, R)) Math.max Math P Math.max(Q, R) Math.max Math Q R System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] lines = line.split(" ");
		int P = Integer.parseInt(lines[0]);
		int Q = Integer.parseInt(lines[1]);
		int R = Integer.parseInt(lines[2]);

		int min = P + Q + R - (int)Math.max(P, Math.max(Q, R));
		System.out.println(min);
	}

}
