import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.Math;

class Main {
	public static void main(String[] args){
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io import java.lang.Math; Math java.lang class Main {
	public static void main(String[] args){
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	}
} Main public static void main(String[] args){
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	} main {
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	} try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); } catch(IOException e) { System.out.println("Exception :" + e); } IOException e { System.out.println("Exception :" + e); } System.out.println("Exception :" + e) System.out.println System.out System System.out "Exception :" + e "Exception :" e {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) String str[] = (br.readLine()).split("\\s+"); str (br.readLine()).split("\\s+") (br.readLine()).split (br.readLine()) br.readLine br "\\s+" int P = Integer.parseInt(str[0]); P Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int Q = Integer.parseInt(str[1]); Q Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int R = Integer.parseInt(str[2]); R Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) pw.println(Math.min(P+Q,Math.min(Q+R,R+P))) pw.println pw Math.min(P+Q,Math.min(Q+R,R+P)) Math.min Math P+Q P Q Math.min(Q+R,R+P) Math.min Math Q+R Q R R+P R P pw.flush() pw.flush pw String[] args args
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.Math;

class Main {
	public static void main(String[] args){
		try {
			
			/* 入力 */
			BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
			String str[] = (br.readLine()).split("\\s+");
			int P = Integer.parseInt(str[0]); 
			int Q = Integer.parseInt(str[1]);
			int R = Integer.parseInt(str[2]);

			PrintWriter pw = new PrintWriter(System.out);		
			
			// 標準出力
			pw.println(Math.min(P+Q,Math.min(Q+R,R+P)));
			
			pw.flush();
			
		} catch(IOException e) { System.out.println("Exception :" + e); }
	}
}