import java.util.*;

class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long P = sc.nextLong();
      long Q = sc.nextLong();
      long R = sc.nextLong();
 
      
      
	  System.out.println(P+Q+R-Math.max(P, Math.max(Q, R)));
  }
  
 
} import java.util.*; util.* java class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long P = sc.nextLong();
      long Q = sc.nextLong();
      long R = sc.nextLong();
 
      
      
	  System.out.println(P+Q+R-Math.max(P, Math.max(Q, R)));
  }
  
 
} Main static int mod=1_000_000_007; mod 1_000_000_007 public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long P = sc.nextLong();
      long Q = sc.nextLong();
      long R = sc.nextLong();
 
      
      
	  System.out.println(P+Q+R-Math.max(P, Math.max(Q, R)));
  } main {
	  Scanner sc = new Scanner(System.in);
      long P = sc.nextLong();
      long Q = sc.nextLong();
      long R = sc.nextLong();
 
      
      
	  System.out.println(P+Q+R-Math.max(P, Math.max(Q, R)));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long P = sc.nextLong(); P sc.nextLong() sc.nextLong sc long Q = sc.nextLong(); Q sc.nextLong() sc.nextLong sc long R = sc.nextLong(); R sc.nextLong() sc.nextLong sc System.out.println(P+Q+R-Math.max(P, Math.max(Q, R))) System.out.println System.out System System.out P+Q+R-Math.max(P, Math.max(Q, R)) P+Q+R P+Q+R P Q R Math.max(P, Math.max(Q, R)) Math.max Math P Math.max(Q, R) Math.max Math Q R String[] args args
import java.util.*;

class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long P = sc.nextLong();
      long Q = sc.nextLong();
      long R = sc.nextLong();
 
      
      
	  System.out.println(P+Q+R-Math.max(P, Math.max(Q, R)));
  }
  
 
}
