import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	} main {

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	} 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 min = 200; min 200 if (min >= P + Q) {
			min = P + Q;
		} min >= P + Q min P + Q P Q {
			min = P + Q;
		} min = P + Q min P + Q P Q if (min >= P + R) {
			min = P + R;
		} min >= P + R min P + R P R {
			min = P + R;
		} min = P + R min P + R P R if (min >= Q + R) {
			min = Q + R;
		} min >= Q + R min Q + R Q R {
			min = Q + R;
		} min = Q + R min Q + R Q R System.out.print(min) System.out.print System.out System System.out min String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	}
} Main
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();
		int min = 200;

		if (min >= P + Q) {
			min = P + Q;
		}

		if (min >= P + R) {
			min = P + R;
		}

		if (min >= Q + R) {
			min = Q + R;
		}

		System.out.print(min);
	}
}
