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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	}

} 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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	}

} 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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

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

		int P = sc.nextInt();
		int Q = sc.nextInt();
		int R = sc.nextInt();

		int case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	} 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 case_1 = P +Q; case_1 P +Q P Q int case_2 = P +R; case_2 P +R P R int case_3 = R +Q; case_3 R +Q R Q int case_4 = Q +R; case_4 Q +R Q R if(case_1>case_2)case_1=case_2; case_1>case_2 case_1 case_2 case_1=case_2 case_1 case_2 if(case_1>case_3)case_1=case_3; case_1>case_3 case_1 case_3 case_1=case_3 case_1 case_3 if(case_1>case_4)case_1=case_4; case_1>case_4 case_1 case_4 case_1=case_4 case_1 case_4 System.out.println(case_1) System.out.println System.out System System.out case_1 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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	}

} 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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	}

} 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 case_1 = P +Q;
		int case_2 = P +R;
		int case_3 = R +Q;;
		int case_4 = Q +R;
		//int min = 0;

		//if(min>case_1)min=case_1;
		if(case_1>case_2)case_1=case_2;
		if(case_1>case_3)case_1=case_3;
		if(case_1>case_4)case_1=case_4;

		System.out.println(case_1);
	}

}
