import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	} main {
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int p = scan.nextInt(); p scan.nextInt() scan.nextInt scan int q = scan.nextInt(); q scan.nextInt() scan.nextInt scan int r = scan.nextInt(); r scan.nextInt() scan.nextInt scan int[] a = {p, q, r}; a {p, q, r} p q r Arrays.sort(a) Arrays.sort Arrays a System.out.println(a[0] + a[1]) System.out.println System.out System System.out a[0] + a[1] a[0] a 0 a[1] a 1 String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	}
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int p = scan.nextInt();
		int q = scan.nextInt();
		int r = scan.nextInt();

		int[] a = {p, q, r};
		Arrays.sort(a);

		System.out.println(a[0] + a[1]);
	}
}
