import 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    }
}      import java.util.*; util.* java 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    }
} 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    } main {
		Scanner sc = new Scanner(System.in);
      int P = sc.nextInt();
      int Q = sc.nextInt();
      int R = sc.nextInt();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    } 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 System.out.println(Math.min(Math.min(P+Q,Q+R),R+P)) System.out.println System.out System System.out Math.min(Math.min(P+Q,Q+R),R+P) Math.min Math Math.min(P+Q,Q+R) Math.min Math P+Q P Q Q+R Q R R+P R P 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    }
} 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    }
} Main
import 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();
      System.out.println(Math.min(Math.min(P+Q,Q+R),R+P));
    }
}     