import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int P=Integer.parseInt(sc.next());
		int Q=Integer.parseInt(sc.next());
		int R=Integer.parseInt(sc.next());

		int a = P+Q;
		int b = Q+R;
		int c = R+P;
		System.out.println(Math.min(a, Math.min(b, c)));

	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int P=Integer.parseInt(sc.next());
		int Q=Integer.parseInt(sc.next());
		int R=Integer.parseInt(sc.next());

		int a = P+Q;
		int b = Q+R;
		int c = R+P;
		System.out.println(Math.min(a, Math.min(b, c)));

	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int P=Integer.parseInt(sc.next());
		int Q=Integer.parseInt(sc.next());
		int R=Integer.parseInt(sc.next());

		int a = P+Q;
		int b = Q+R;
		int c = R+P;
		System.out.println(Math.min(a, Math.min(b, c)));

	} main {

		Scanner sc = new Scanner(System.in);

		int P=Integer.parseInt(sc.next());
		int Q=Integer.parseInt(sc.next());
		int R=Integer.parseInt(sc.next());

		int a = P+Q;
		int b = Q+R;
		int c = R+P;
		System.out.println(Math.min(a, Math.min(b, c)));

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int P=Integer.parseInt(sc.next()); P Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int Q=Integer.parseInt(sc.next()); Q Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int R=Integer.parseInt(sc.next()); R Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a = P+Q; a P+Q P Q int b = Q+R; b Q+R Q R int c = R+P; c R+P R P System.out.println(Math.min(a, Math.min(b, c))) System.out.println System.out System System.out Math.min(a, Math.min(b, c)) Math.min Math a Math.min(b, c) Math.min Math b c String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int P=Integer.parseInt(sc.next());
		int Q=Integer.parseInt(sc.next());
		int R=Integer.parseInt(sc.next());

		int a = P+Q;
		int b = Q+R;
		int c = R+P;
		System.out.println(Math.min(a, Math.min(b, c)));

	}
}
