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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	}

} 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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	}

} 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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	} main {
		Scanner sc = new Scanner(System.in);

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		sc.close();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(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 sc.close() sc.close sc int min = 1000; min 1000 int[] val = { p + q, p + r, q + r }; val { p + q, p + r, q + r } p + q p q p + r p r q + r q r for (int i : val) {
			min = Math.min(min, i);
		} int i val {
			min = Math.min(min, i);
		} {
			min = Math.min(min, i);
		} min = Math.min(min, i) min Math.min(min, i) Math.min Math min i System.out.println(min) System.out.println System.out System System.out min 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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	}

} 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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	}

} 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();

		int min = 1000;

		int[] val = { p + q, p + r, q + r };
		for (int i : val) {
			min = Math.min(min, i);
		}
		System.out.println(min);

	}

}
