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 a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      System.out.println(Q+R);
    }
} 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 a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      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();
      int a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      System.out.println(Q+R);
    } main {
    Scanner sc=new Scanner(System.in);
      int P=sc.nextInt();
      int Q=sc.nextInt();
      int R=sc.nextInt();
      int a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      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 int a=0; a 0 int b=0; b 0 if (R>Q){
        a=R;
        R=Q;
        Q=a;
      } R>Q R Q {
        a=R;
        R=Q;
        Q=a;
      } a=R a R R=Q R Q Q=a Q a if(Q>P){
        b=Q;
        Q=P;
        P=b;
      } Q>P Q P {
        b=Q;
        Q=P;
        P=b;
      } b=Q b Q Q=P Q P P=b P b System.out.println(Q+R) System.out.println System.out System System.out Q+R Q R 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 a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      System.out.println(Q+R);
    }
} 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 a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      System.out.println(Q+R);
    }
} 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 a=0;
      int b=0;
      if (R>Q){
        a=R;
        R=Q;
        Q=a;
      }
      if(Q>P){
        b=Q;
        Q=P;
        P=b;
      }
      System.out.println(Q+R);
    }
}