import java.util.Scanner;

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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		int ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		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 ans = 2000; ans 2000 ans = Math.min(P+Q,ans) ans Math.min(P+Q,ans) Math.min Math P+Q P Q ans ans = Math.min(P+R,ans) ans Math.min(P+R,ans) Math.min Math P+R P R ans ans = Math.min(Q+R,ans) ans Math.min(Q+R,ans) Math.min Math Q+R Q R ans 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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

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 ans = 2000;
		ans = Math.min(P+Q,ans);
		ans = Math.min(P+R,ans);
		ans = Math.min(Q+R,ans);
		System.out.println(ans);
	}
}
