import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int P = Integer.parseInt(str[0]); P Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int Q = Integer.parseInt(str[1]); Q Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int R = Integer.parseInt(str[2]); R Integer.parseInt(str[2]) Integer.parseInt Integer str[2] str 2 int a = P+Q; a P+Q P Q int b = Q+R; b Q+R Q R int c = R+P; c R+P R P if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		} a<=b && a<=c a<=b a b a<=c a c {
			System.out.print(a);
		} System.out.print(a) System.out.print System.out System System.out a if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		} b<=a && b<=c b<=a b a b<=c b c {
			System.out.print(b);
		} System.out.print(b) System.out.print System.out System System.out b if(c<=a && c<=b) {
			System.out.print(c);
		} c<=a && c<=b c<=a c a c<=b c b {
			System.out.print(c);
		} System.out.print(c) System.out.print System.out System System.out c String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	}

} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String[] str = br.readLine().split(" ");

		int P = Integer.parseInt(str[0]);
		int Q = Integer.parseInt(str[1]);
		int R = Integer.parseInt(str[2]);

		int a = P+Q;
		int b = Q+R;
		int c = R+P;

		if(a<=b && a<=c) {
			System.out.print(a);
		}else if(b<=a && b<=c) {
			System.out.print(b);
		}else if(c<=a && c<=b) {
			System.out.print(c);
		}



	}

}
