import 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			}
} import java.util.*; util.* java 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			}
} 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			} main {
		Scanner sc = new Scanner(System.in);
		//整数型を宣言して読み込む
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			} 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 int a=0; a 0 int b=0; b 0 int c=0; c 0 a=P+Q a P+Q P Q b=P+R b P+R P R c=Q+R c Q+R Q R int ans=0; ans 0 ans=Math.min(a, (Math.min(b, c))) ans Math.min(a, (Math.min(b, c))) Math.min Math a (Math.min(b, c)) Math.min Math b c System.out.println(ans) System.out.println System.out System System.out ans 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			}
} 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			}
} Main
import 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();
		int a=0;
		int b=0;	
		int c=0;		
		a=P+Q;
		b=P+R;
		c=Q+R;		
		int ans=0;
		ans=Math.min(a, (Math.min(b, c)));
		System.out.println(ans);
			}
}