import java.util.*;

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<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   }

  }
 } import java.util.*; util.* java 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<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   }

  }
 } 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<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   }

  } main {

	Scanner sc = new Scanner(System.in);

	int P = sc.nextInt();

	int Q = sc.nextInt();

	int R = sc.nextInt();

	if(P<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   }

  } 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<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   } P<=R && Q<=R P<=R P R Q<=R Q R {

	System.out.println(P+Q);

   } System.out.println(P+Q) System.out.println System.out System System.out P+Q P Q if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   } P<=Q && R<=Q P<=Q P Q R<=Q R Q {

	System.out.println(P+R);

   } System.out.println(P+R) System.out.println System.out System System.out P+R P R {

	System.out.println(Q+R);

   } System.out.println(Q+R) System.out.println System.out System System.out Q+R Q R String[] args args
import java.util.*;

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<=R && Q<=R){

	System.out.println(P+Q);

   }

	else if (P<=Q && R<=Q){

	System.out.println(P+R);

   }

	else{

	System.out.println(Q+R);

   }

  }
 }