import java.util.*;
import java.io.*;

class Main {

	void solve () {

		int p = in.nextInt(), q = in.nextInt(), r = in.nextInt();
		int[] ar = {p+q, p+r, q+r};
		Arrays.sort(ar);
		out.println(ar[0]);
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} import java.util.*; util.* java import java.io.*; io.* java class Main {

	void solve () {

		int p = in.nextInt(), q = in.nextInt(), r = in.nextInt();
		int[] ar = {p+q, p+r, q+r};
		Arrays.sort(ar);
		out.println(ar[0]);
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

} Main public static PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static Scanner in = new Scanner(System.in); in new Scanner(System.in) void solve () {

		int p = in.nextInt(), q = in.nextInt(), r = in.nextInt();
		int[] ar = {p+q, p+r, q+r};
		Arrays.sort(ar);
		out.println(ar[0]);
		
	} solve {

		int p = in.nextInt(), q = in.nextInt(), r = in.nextInt();
		int[] ar = {p+q, p+r, q+r};
		Arrays.sort(ar);
		out.println(ar[0]);
		
	} int p = in.nextInt() p in.nextInt() in.nextInt in q = in.nextInt() q in.nextInt() in.nextInt in r = in.nextInt(); r in.nextInt() in.nextInt in int[] ar = {p+q, p+r, q+r}; ar {p+q, p+r, q+r} p+q p q p+r p r q+r q r Arrays.sort(ar) Arrays.sort Arrays ar out.println(ar[0]) out.println out ar[0] ar 0 public static void main(String[] args) {
		new Main().solve();
		out.flush();
	} main {
		new Main().solve();
		out.flush();
	} new Main().solve() new Main().solve new Main() out.flush() out.flush out String[] args args
import java.util.*;
import java.io.*;

class Main {

	void solve () {

		int p = in.nextInt(), q = in.nextInt(), r = in.nextInt();
		int[] ar = {p+q, p+r, q+r};
		Arrays.sort(ar);
		out.println(ar[0]);
		
	}

	public static PrintWriter out = new PrintWriter(System.out);
	public static Scanner in = new Scanner(System.in);
	public static void main(String[] args) {
		new Main().solve();
		out.flush();
	}

}