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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	}
} 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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	}
} 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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

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

		int p = sc.nextInt();
		int q = sc.nextInt();
		int r = sc.nextInt();
		int m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	} 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 m = Integer.MAX_VALUE; m Integer.MAX_VALUE Integer Integer.MAX_VALUE m = Math.min(m, (p + q)) m Math.min(m, (p + q)) Math.min Math m (p + q) p q m = Math.min(m, (p + r)) m Math.min(m, (p + r)) Math.min Math m (p + r) p r m = Math.min(m, (q + r)) m Math.min(m, (q + r)) Math.min Math m (q + r) q r System.out.println(m) System.out.println System.out System System.out m 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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	}
} 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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	}
} 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 m = Integer.MAX_VALUE;

		m = Math.min(m, (p + q));
		m = Math.min(m, (p + r));
		m = Math.min(m, (q + r));

		System.out.println(m);
	}
}
