

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	}

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	}

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	} main {

		Scanner sc = new Scanner(System.in);

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	} 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 if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q); p < q p q System.out.println(Math.min(q, r) + p) System.out.println System.out System System.out Math.min(q, r) + p Math.min(q, r) Math.min Math q r p System.out.println(Math.min(p, r) + q) System.out.println System.out System System.out Math.min(p, r) + q Math.min(p, r) Math.min Math p r q 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();

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	}

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	}

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

		if (p < q)
			System.out.println(Math.min(q, r) + p);
		else
			System.out.println(Math.min(p, r) + q);
	}

}
