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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	}
} 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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	}
} 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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	} main {
		Scanner sc = new Scanner(System.in);
		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	} 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 sc.close() sc.close sc System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R)))) System.out.println System.out System System.out P + Q + R - (Math.max(P, Math.max(Q, R))) P + Q + R P + Q + R P Q R (Math.max(P, Math.max(Q, R))) Math.max Math P Math.max(Q, R) Math.max Math Q R 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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	}
} 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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	}
} 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();
		sc.close();
		System.out.println(P + Q + R - (Math.max(P, Math.max(Q, R))));
	}
}
